home *** CD-ROM | disk | FTP | other *** search
/ Hacker's Arsenal - The Cutting Edge of Hacking / Hacker's Arsenal - The Cutting Edge of Hacking.iso / texts / begunix.txt < prev    next >
Text File  |  2001-07-11  |  329KB  |  7,934 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                                   UNIX for Beginning Users
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                             Developed by:
  39.  
  40.                                    User Liaison Section, D-7131
  41.                                    Denver Office
  42.            
  43.                             [Name and Phone number deleted at authors
  44.                              Request]
  45.  
  46.                             Revision Date:  September 16, 1991
  47. I.  INTRODUCTION
  48.  
  49.  
  50. A.  Audience
  51.  
  52.  
  53. This course is for individuals who will be using the UNIX
  54. operating system on a Reclamation computer platform.  It is
  55. assumed that the student has a general understanding of data
  56. processing concepts.
  57.  
  58.  
  59.  
  60. B.  Course Objectives
  61.  
  62.  
  63. Upon successful completion of this course the student will be
  64. able to:
  65.  
  66.        1.     Demonstrate a knowledge of basic UNIX ideas.
  67.  
  68.        2.     Recognize the different types of files and the file
  69.               structure.
  70.  
  71.        3.     Log in and out of UNIX using an interactive terminal.
  72.  
  73.        4.     Change the password and be aware of other
  74.               responsibilities of owning an account.
  75.  
  76.        5.     Demonstrate a knowledge of where to get help.
  77.  
  78.        6.     Use the appropriate UNIX commands to display/print  
  79.               files, copy/move files, change file access permissions,
  80.               create/delete directories, and change the current
  81.               working directory.
  82.  
  83.        7.     Transfer a file to another computer platform using File
  84.               Transfer Protocol (FTP).  Use FTP commands to do the
  85.               following:  initialize FTP, establish connection, local
  86.               computer commands, remote computer commands, close
  87.               connection, exit FTP, help command, and special
  88.               functions.
  89.  
  90.        8.     Use an editor to create files, input text,
  91.               insert/replace text, copy/move text, and exit/save
  92.               changes.
  93.  
  94.        9.     Use the mail utility to send/receive/delete messages
  95.  
  96.        10.    Use basic Annex commands to reestablish connection to a
  97.               disconnected process.
  98. C.  Course Handout Conventions
  99.  
  100.  
  101. There are several conventions used in this handout for
  102. consistency and easier interpretation:
  103.  
  104.  
  105.        1.     Samples of actual terminal sessions are single-lined
  106.               boxed.
  107.  
  108.  
  109.        2.     User entries are shown in bold print and are
  110.               underlined.
  111.  
  112.               QUIT
  113.  
  114.  
  115.        3.     All keyboard functions in the text will be bold.  
  116.  
  117.               (Ret)                       Backspace
  118.               Tab                         Ctrl-F6
  119.               Print (Shift-F7)            Go to DOS (1)
  120.  
  121.               NOTE:         (Ret) indicates the Return or Enter key
  122.                             located above the right Shift key.
  123.  
  124.  
  125.        4.     Examples of user entries not showing the computer's
  126.               response are in dotted-lined boxes.                     
  127.               
  128.  
  129.  
  130.        5.     Command formats are double-lined boxed.
  131.  
  132.  
  133.        6.     Three dots either in vertical or horizontal alignment
  134.               mean continuation or that data is missing from the
  135.               diagram.
  136.  
  137. ┌───────────────────────────────────────────────────────────────┐
  138. │                                                               │
  139. │                                                               │
  140. │        Multimax, Nanobus, and UMAX are trademarks of          │
  141. │        Encore Computer Corporation                            │
  142. │                                                               │
  143. │                                                               │
  144. │        Annex is a trademark of XYLOGICS, Inc                  │
  145. │                                                               │
  146. │                                                               │
  147. │        UNIX and Teletype are registered trademarks of         │
  148. │        AT&T Bell Laboratories                                 │
  149. │                                                               │
  150. │                                                               │
  151. │        Ethernet is a trademark of Xerox Corporation           │
  152. │                                                               │
  153. │                                                               │
  154. │                                                               │
  155. └───────────────────────────────────────────────────────────────┘
  156.  
  157. 1.  BASIC UNIX IDEAS
  158.  
  159.  
  160. The UNIX operating system is a set of programs that act as a link
  161. between the computer and the user.  The programs that allocate
  162. the system resources and coordinate all the details of the
  163. computer's internals is called the operating system or kernel.
  164.  
  165. Users communicate with the kernel through a program known as the
  166. shell.  The shell is a command line interpreter; it translates
  167. commands entered by the user and converts them into a language
  168. that is understood by the kernel.
  169.  
  170. Here is a basic block diagram of a UNIX system.
  171.  
  172.  
  173.                     Spread Sheet  Compilers  
  174.                     Calculators       │
  175.                          │            │
  176.                          V            V      
  177.                  ┌───────────────────────────────┐
  178.                  │          The Shell            │   Mail and
  179.                  │   ┌──────────────────────┐    │<- Message
  180.     Inventory    │   │  UNIX system kernel  │    │   Facilities
  181.     Control  --->│   │   ┌──────────────┐   │    │
  182.     Systems      │   │   │              │   │    │<- Interpreters 
  183.                  │   │   │   Hardware   │   │    │
  184.     Formatters ->│   │   │              │   │    │<- DBMS
  185.                  │   │   │              │   │    │
  186.     Calendar     │   │   └──────────────┘   │    │   Word
  187.     Systems ---->│   │                      │    │<- Processors
  188.                  │   └──────────────────────┘    │
  189.     Editors ---->│                               │<- FTP
  190.                  └───────────────────────────────┘
  191.  
  192. The designers of UNIX used the following Maxims while writing the
  193. new operating system.
  194.  
  195.        1.     Make each program do one thing well.  These simple
  196.               programs would be called "tools."
  197.  
  198.        2.     Expect the output of every program to be the input to
  199.               another program.
  200.  
  201.        3.     Don't stop building new "tools" to do a job.  The
  202.               library of tools should keep increasing.
  203. 1.1  The UNIX System
  204.  
  205.  
  206. The main concept that unites all versions of UNIX is the
  207. following four basics:
  208.  
  209.  
  210. Kernel 
  211.  
  212. The kernel is the heart of the operating system.  It schedules
  213. tasks and manages data storage.  The user rarely interfaces with
  214. the kernel directly.  This is the memory resident portion of the
  215. operating system.
  216.  
  217.  
  218. Shell
  219.  
  220. The shell is the utility that processes your requests.  When you
  221. type in a command at your terminal, the shell interprets the
  222. command and calls the program that you want.  The shell will
  223. support multiple users, multiple tasks, and multiple interfaces
  224. to itself.  The shell uses standard syntax for all commands. 
  225. There are two popular shells currently available, the BourneShell
  226. (standard System V UNIX) and the CShell (BSD UNIX).  Because
  227. separate users can use different shells at the same time, the
  228. system can appear different to different users.  There is another
  229. shell known as the KornShell (named after its designer), which is
  230. popular with programmers.  This ability to provide a customized
  231. user interface is one of the most powerful features of UNIX.
  232.  
  233.  
  234. Commands and Utilities
  235.  
  236. Separate utilities can be easily combined to customize function
  237. and output.  They are flexible, adaptable, portable, and modular. 
  238. They use pipes and filters.  There are over 200 standard commands
  239. plus numerous others provided through 3rd party software.
  240.  
  241.  
  242. Files and Directories
  243.  
  244. The directory system supports a multilevel hierarchy.  Files and
  245. directories have access protection.  Files and directories are
  246. accessed through pathnames.  Files support multiple name links. 
  247. Removable filesystems are also supported.
  248. 1.2  File Structure
  249.  
  250.  
  251. All data in UNIX is organized into files.  All files are
  252. organized into directories.  These directories are organized into
  253. a tree-like structure called the filesystem.  The following
  254. diagram describes the top level organization of the UNIX
  255. filesystem:
  256.  
  257.                               /
  258.                             (root)                       
  259.                               │                       
  260.    ┌───────┬───────┬───────┬──┴────┬──────┬──────┐        
  261.    │       │       │       │       │      │      │     
  262.  bin      dev     etc     lib     tmp    usr   users      
  263.                                                  
  264.  
  265. These directories, in turn, are also organized hierarchically.
  266.  
  267.  
  268. For example:
  269.                               /
  270.                               │                 
  271.         ┌──────────────────┬──┴────────────────────┐
  272.         │                  │                       │
  273.        dev                etc                     usr             
  274.         │                  │                       │
  275.     ┌───┴──┐           ┌───┴──┐        ┌────────┬──┴───────────┐
  276.     │      │           │      │        │        │              │
  277.   dsk     rmt       init.d  rc0.d    mail      adm          spool
  278.                                                 │             
  279.                                             ┌───┴───┐            
  280.                                             │       │         
  281.                                           acct     sa
  282.  
  283.  
  284. In this example, dev, etc, usr, and adm are directories. 
  285. Directories contain other files or directories. Plain files
  286. contain text or binary data and contain no information about
  287. other files or directories.
  288. Users can make use of this same structure to organize their
  289. files.
  290.  
  291. For example:
  292.                          / 
  293.                          │
  294.         ┌────────────────┼─────────────┐
  295.         │                │             │        
  296.        bin             users          dev
  297.                          │
  298.            ┌─────────────┴───────────────┐         
  299.            │                             │      
  300.         bsmith                         sjones          
  301.            │                             │      
  302.      ┌─────┴────┐             ┌──────────┴───┬──────────┐ 
  303.      │          │             │              │          │
  304.    memos      progs        physics          chem     history
  305.      │          │             │              │          │  
  306.   ┌──┴──┐    ┌──┴───┐      ┌──┴───┐       ┌──┴──┐      ┌┴──┐
  307.   │     │    │      │      │      │       │     │      │   │
  308.  mfg   eng   c     f77   mods   calcs   forms  notes  loc anc
  309.  
  310.  
  311. Every file has a name.  A filename is composed of one to fourteen
  312. characters.  Although you can use almost any character in a
  313. filename, you will avoid confusion if you choose characters from
  314. the following list.
  315.  
  316.        1.     upper case letters [A-Z]
  317.        2.     lower case letters [a-z]
  318.        3.     numbers [0-9]
  319.        4.     underscore [_]
  320.        5.     period [.]
  321.        6.     comma [,]      
  322.  
  323. The only exception is the root directory, which always uses the
  324. symbol /.  No other directory or file can use this symbol.
  325.  
  326. Like children of one parent, no two files in the same directory
  327. can have the same name.  Files in different directories, like
  328. children of different parents, can have the same name.
  329.  
  330. The filenames you choose should mean something.  Too often, a
  331. directory is filled with important files with names like foobar,
  332. wombat, and junk.  A meaningless name won't help you recall the
  333. contents of a file.  Use filenames that are descriptive of the
  334. contents.
  335. 1.3 UNIX System Files
  336.  
  337. In order for you to have a basic understanding of the contents of
  338. some of the system directories, here is a partial list of those
  339. directories and what files they contain:
  340.  
  341. /bin                 This is where the executable files are located.
  342.                      They are available to all user.
  343.  
  344. /dev                 These are device drivers.
  345.  
  346. /etc                 Supervisor directory commands, configuration
  347.                      files, disk configuration files, reboot files,
  348.                      valid user lists, groups, ethernet, hosts, where
  349.                      to send critical messages.
  350.  
  351. /lib                 compiler libraries
  352.  
  353. /tmp                 scratch processes, editors, compilers, and
  354.                      databases
  355.  
  356. /bsd                 Berkeley commands
  357.  
  358. /mnt                 empty, used for disks
  359.  
  360. /stand               boot information
  361.  
  362. /lost+found          orphans go here (look here after system crash)
  363.  
  364. /unix*               executable, bootable kernel
  365.  
  366. This is not an exhaustive list of directories that contain system
  367. information but it is intended to remove some of the mystery
  368. behind these directories and the types of files they contain.
  369. 1.4  Command Line Syntax
  370.  
  371.  
  372. Users enter commands at the shell prompt.  The default
  373. BourneShell prompt is the dollar sign ($).  In general, the shell
  374. expects to see the following syntax:
  375.  
  376. ╔═══════════════════════════════════════════════════════════════╗
  377. ║  Command Format:  command  options  arguments                 ║
  378. ╚═══════════════════════════════════════════════════════════════╝
  379.  
  380.  
  381. Command       -      This is the UNIX command.  Sometimes the command
  382.                      is representative of the function.  For example,
  383.                      the command to list the contents of a directory is
  384.                      ls.  The first and third letters of the word
  385.                      "list" are used.  Unfortunately, this is not
  386.                      always the case.
  387.  
  388.  
  389. Options       -      These are also known as flags.  The common form
  390.                      is:
  391.                                              -A
  392.  
  393.                      where A is the abbreviation of the optional
  394.                      function of the command.  For example, the command
  395.                      ls lists the contents of a directory, while the
  396.                      command ls -l provides a long listing and ls -C
  397.                      provides output in columns.  Several options can
  398.                      be combined following one '-'; for example -CF, or
  399.                      they can be entered separately as -C -F.
  400.  
  401.  
  402. Arguments     -      These can be file names, user names, or qualifiers
  403.                      to the command or one of its options.
  404. Example:
  405.  
  406. .................................................................
  407. . $ls -CF sjones                                                .
  408. .................................................................
  409.  
  410.  
  411. The UNIX command is ls list contents of directory the dash (-)
  412. indicates the options.
  413.  
  414.  
  415.      C  =     Multiple-column output with entries sorted down the
  416.               columns
  417.  
  418.      F  =     Put a slash (/) after each filename if that file is a
  419.               directory and put an asterisk (*) after each filename
  420.               that is executable.
  421.  
  422. sjones  =     name of the directory to list (it can be a 
  423.           relative or absolute pathname)
  424.  
  425.  
  426. Example:
  427.  
  428. .................................................................
  429. . $diff memo1 memo2                                             .
  430. .................................................................
  431.  
  432.  
  433. diff          - differential file comparator command
  434.  
  435. memo1         - filename argument
  436.  
  437. memo2         - filename argument
  438.  
  439.  
  440. This command will tell what lines must be changed in two files to
  441. bring them into agreement.
  442. Here is another example that doesn't fit the general syntax for
  443. UNIX commands.  
  444.  
  445. Example:
  446.  
  447. .................................................................
  448. . $find . -atime +7 -print                                      .
  449. .................................................................
  450.  
  451.                                                                  
  452. find          -      find files
  453.  
  454. .             -      the current working directory
  455.  
  456. -atime        -      True if the file has been accessed in n days (n is
  457.                      the +7)
  458.  
  459. -print        -      always true; causes the current path name to be
  460.                      printed
  461.  
  462.  
  463. So, this command will give a listing of all files in your current
  464. working directory that have been accessed in the past seven days.
  465.  
  466. Some commands have several options and/or arguments; while
  467. others, like passwd and mail, are interactive and will prompt the
  468. user for additional input.
  469. 1.5  Correcting Mistakes
  470.  
  471.  
  472. Because the shell and most other utilities do not interpret the
  473. command line (or other text) until you press the (Ret) key, you
  474. can correct typing mistakes before you press (Ret).  There are
  475. two ways to correct typing mistakes.  You can erase one character
  476. at a time, or you can back up to the beginning of the command
  477. line in one step.   After you press (Ret), it is too late to make
  478. a correction.
  479.  
  480.  
  481.  
  482. 1.5.1  Erasing Characters
  483.  
  484.  
  485. When entering characters from the keyboard, you can backspace up
  486. to and over a mistake by pressing the erase key (#) one time for
  487. each character you wish to delete.  The # will appear on the
  488. screen, and the character preceding it will be discounted.
  489.  
  490.  
  491. Example:
  492.  
  493. .................................................................
  494. . $ls phajne#y                                                  .
  495. .................................................................
  496.  
  497.  
  498. In this example, the e will be ignored and ls phajny is sent to
  499. the Multimax.  Multiple typos can be erased; simply press one #
  500. for each character to be erased.  The erase key will back up as
  501. many characters as you wish, but it will not back up past the
  502. beginning of the line.
  503.  
  504.  
  505.  
  506. 1.5.2  Deleting an Entire Line
  507.  
  508. You can delete an entire line you are entering any time before
  509. you press (Ret) by pressing the kill key (@).  When you press the
  510. @ (kill key), the cursor moves down to the next line and all the
  511. way to the left.  The shell doesn't give you another prompt, but
  512. it is as though the cursor is following a prompt.  The operating
  513. system does not remove the line with the mistake but instead
  514. ignores it.  Now enter the command (or text) again from the
  515. start.
  516. 1.5.3  Aborting Program Execution
  517.  
  518.  
  519. Sometimes you may want to terminate a running program.  UNIX
  520. might be performing a listing that is too long to display on your
  521. screen or for some other reason you want to terminate execution. 
  522. To terminate program execution press the Delete key.  The
  523. operating system sends a terminal interrupt signal to the shell. 
  524. When the shell receives this signal, it displays a prompt and
  525. waits for another command.
  526.  
  527.  
  528.  
  529. 1.5.4  Controlling Output to the Screen
  530.  
  531.  
  532. There are several ways to control the flow of characters to the
  533. screen as a result of executing a command.  Such as:
  534.  
  535.  
  536. Ctrl-S               -      This keyboard function command will suspend
  537.                             the flow of characters to the screen as the
  538.                             result of executing a command.  The screen
  539.                             will not continue until the keyboard function
  540.                             to resume output is given.
  541.  
  542.  
  543. Ctrl-Q               -      This keyboard function command will resume
  544.                             the output to the screen.
  545.  
  546.  
  547. Hold Screen          -      If your terminal has this key (i.e. VT200),
  548.                             you can press it once to stop output to the
  549.                             screen.  To resume output to the screen,
  550.                             press the key again.
  551.  
  552.  
  553. Denver BOR MULTIMAX
  554.  
  555. Each BOR Multimax 310 has four 15 Megahertz National
  556. Semiconductor 32-bit processors with 64 kilobytes of cache memory
  557. rated at 2 million instructions per second (MIPS) for a total of
  558. 8 MIPS. The main memory consists of 32 megabytes (million bytes).
  559. There can be a maximum of 14 disk drives. Each drive has a
  560. capacity of 600 megabytes for a total capacity of 8.4 gigabytes
  561. (a gigabyte is one thousand million bytes)
  562.  
  563. Connection to the Multimax is accomplished through one of several
  564. methods. Access is made through TCP/IP based Annex terminal
  565. servers. The two Annex II servers have 32 ports each and the
  566. Annex I has 16 ports. The Annex II servers will allow up to 64
  567. users access to the two Multimax computers. The Annex I is used
  568. for access to the on-line printers. CDCnet and TELNET are other
  569. ways to gain access to the Multimaxes.
  570.  
  571. Printouts are handled on a 600-line-per-minute line printer and a
  572. 10-page-per-minute laser printer. Each Multimax has a hardcopy
  573. terminal and a CRT to serve as an operator console. There are two
  574. tape drives capable of 1600 or 6250 bits per inch (bpi) on each
  575. system. There is also a cassette tape drive.
  576.  
  577. Software available are FORTRAN, COBOL, C, and UNISOL (an
  578. accounting package). The database management system is INGRES by
  579. Relational Technology, Inc.  PROCOMM+ will be the communication
  580. interface with IBM PC's and compatibles. The operating system for
  581. the Multimax is UMAX V. UMAX V is the name for the Encore
  582. implementation of UNIX System V.
  583. 1.6  Logging on the Annex
  584.  
  585.  
  586. This sample session shows how the login process is displayed on
  587. the terminal screen and is uniform for all users.  To bring the
  588. standard menu onto the screen, press the Space Bar.  If you are
  589. using a PC, first start PROCOMM+.  Then when you are in the
  590. Terminal-Mode Screen, press the Space Bar; and the MICOM menu
  591. will appear.
  592.  
  593.  
  594. NOTE:         Login procedures from the regions are included in the
  595.               back of this manual
  596.  
  597.  
  598. Sample Session:
  599.  
  600. ┌───────────────────────────────────────────────────────────────┐
  601. │ WELCOME TO THE B.O.R. NETWORK P/S:B                           │
  602. │ SYSTEMS PRESENTLY AVAILABLE ARE:                              │
  603. │                                                               │
  604. │  **SYSTEM**         **NAME**                                  │
  605. │                                                               │
  606. │ VAX 8300'S            VAX                                     │
  607. │ CYBER/CDCNET F.E.     CDC                                     │
  608. │ ENCORE/UNIX           MAX                                     │
  609. │ OUT DIAL              OD                                      │
  610. │                                                               │
  611. │ TO SELECT A SYSTEM, ENTER THE SYSTEM                          │
  612. │ NAME AND CARRIAGE RETURN AT NEXT                              │
  613. │ PROMPT.                                                       │
  614. │                                                               │
  615. │ CHANNEL 08/061. ENTER RESOURCE MAX                            │
  616. │                                                               │
  617. └───────────────────────────────────────────────────────────────┘
  618.  
  619.  
  620. MAX is the resource name you must enter to be connected to the
  621. Annex, which is the Multimax front end processor.  Some MICOM
  622. menus might not have the MAX selection; in this case, enter MAX
  623. to select the Annex.  This is the same as if the menu showed the
  624. option.
  625. After entering MAX you will see something similar to the
  626. following:
  627.  
  628. Sample Session:
  629.  
  630. ┌───────────────────────────────────────────────────────────────┐
  631. │ CONNECTED TO 06/011                                           │
  632. └───────────────────────────────────────────────────────────────┘
  633.  
  634. This indicates that you are connected to the port selector.  Wait
  635. two seconds, press (Ret) twice, and the annex prompt will appear
  636. after a warning message.
  637.  
  638.  
  639. Sample Session:
  640.  
  641. ┌────────────────────────────────────────────────────────────────────────────┐
  642. │                                                                            │
  643. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.         │
  644. │                                                                            │
  645. │  ***WARNING***Unauthorized access to U.S. Government computers             │
  646. │                is punishable by fine and/or imprisonment. ***WARNING***    │
  647. │ annex:                                                                     │
  648. └────────────────────────────────────────────────────────────────────────────┘
  649. 1.7  Logging on the Multimax
  650.  
  651.  
  652. To establish a connection between the Annex and the Multimax
  653. enter the following command at the Annex prompt:
  654.  
  655. ╔═══════════════════════════════════════════════════════════════╗
  656. ║  Command Format:  rlogin <host>                               ║
  657. ║                                                               ║
  658. ║     host - name of the Multimax                               ║
  659. ╚═══════════════════════════════════════════════════════════════╝
  660.  
  661. The Denver Multimaxes have been assigned the names domax0 and
  662. domax1.  The names stand for the Denver Office Multimax System 0
  663. and 1.  The domax0 is used for production of Bureau-wide
  664. applications.  The domax1 is used for training and application
  665. development and it is the one to use for exercises associated
  666. with this course.
  667.  
  668.  To enter domax1 type:
  669.  
  670. Sample Session:
  671.  
  672. ┌───────────────────────────────────────────────────────────────┐
  673. │ annex:rlogin domax1                                           │
  674. └───────────────────────────────────────────────────────────────┘
  675.                               or
  676. ┌───────────────────────────────────────────────────────────────┐
  677. │ annex:r domax1                                                │
  678. └───────────────────────────────────────────────────────────────┘
  679.  
  680. NOTE:         Abbreviations are allowed for the Annex commands, the
  681.               only requirement is to type in enough characters to
  682.               make it unique.
  683.  
  684.  
  685. When the Annex has opened communications with the selected host,
  686. the following prompt will appear:
  687.  
  688.  
  689. Sample Session:
  690.  
  691. ┌───────────────────────────────────────────────────────────────┐
  692. │ login:                                                        │
  693. └───────────────────────────────────────────────────────────────┘
  694. To connect with the host, enter your login name at the prompt.
  695. Your login name is assigned to you by the system administrator
  696. and typically will be your first initial and last name, all one
  697. word with no spaces.  Only 8 characters are allowed for the
  698. username so extra letters will be truncated.
  699.  
  700. Sample Session:
  701.  
  702. ┌───────────────────────────────────────────────────────────────┐
  703. │ login:rharding                                                │
  704. └───────────────────────────────────────────────────────────────┘
  705.  
  706. Once the login name has been accepted, the next prompt will be
  707. for the password.  The following prompt will appear on the
  708. screen.
  709.  
  710. Sample Session:
  711.  
  712. ┌───────────────────────────────────────────────────────────────┐
  713. │ Password:                                                     │
  714. └───────────────────────────────────────────────────────────────┘
  715.  
  716. Enter your password.  For security reasons, the host will not
  717. display your password as you type it.
  718.  
  719. Sample Session:
  720.  
  721. ┌───────────────────────────────────────────────────────────────┐
  722. │ Password: secret                                              │
  723. └───────────────────────────────────────────────────────────────┘
  724.  
  725. Once you have entered the correct password.  The login procedure
  726. will continue and the following will appear on the monitor
  727. screen.
  728.  
  729. Sample Session:
  730.  
  731. ┌────────────────────────────────────────────────────────────────────────────────┐
  732. │ UNIX System V Release ax.2.2o ns32332                                          │
  733. │ domax1                                                                         │
  734. │ Copyright (c) 1984 AT&T                                                        │
  735. │ All Rights Reserved                                                            │
  736. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  737. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  738. │ $                                                                              │
  739. └────────────────────────────────────────────────────────────────────────────────┘
  740.  
  741. At this point you are successfully signed on to the Multimax. 
  742. The dollar sign ($) is the default prompt for the BourneShell.
  743.  
  744.  
  745.  
  746. 1.8  Logging Off the Multimax
  747.  
  748.  
  749. At the shell prompt $, you can logout of the Multimax using one
  750. of the following methods:  
  751.  
  752.  
  753.        1.     Enter the keyboard function command Ctrl-D.
  754.  
  755.        2.     Type the UNIX command exit.
  756.  
  757.  
  758. Once you have entered the command to logout the following will
  759. appear on the screen:
  760.  
  761.  
  762. Sample Session:
  763.  
  764. ┌───────────────────────────────────────────────────────────────┐
  765. │ $exit                                                         │
  766. │ CLI: Connection closed.                                       │
  767. │ annex:                                                        │
  768. └───────────────────────────────────────────────────────────────┘
  769.  
  770. Once you are back at the Annex prompt, you can establish another
  771. connection or logout of the Annex.
  772. 1.9  Logging Off the Annex
  773.  
  774.  
  775. When the Annex prompt (annex:) appears, you can enter the command
  776. to logout of the Annex.  The command to logout of the Annex is as
  777. follows:
  778.  
  779. ╔═══════════════════════════════════════════════════════════════╗
  780. ║  Command Format:  hangup                                      ║
  781. ╚═══════════════════════════════════════════════════════════════╝
  782.  
  783.  
  784. There is a 60 minute inactivity timeout programmed into the
  785. Annex; however, it is a waste of resources if you don't enter
  786. hangup. When you are finished with your session, be sure to enter
  787. hangup at the annex: prompt.
  788.  
  789. If you don't type anything for 60 minutes, the Annex will log you
  790. out of the system and display the following message:
  791.  
  792.  
  793. Sample Session:
  794.  
  795. ┌───────────────────────────────────────────────────────────────┐
  796. │ *** Annex Port Reset Due to Inactivity Timeout ***            │
  797. │                                                               │
  798. │ Annex Command Line Interpreter                                │
  799. │ DISCONNECTED                                                  │
  800. └───────────────────────────────────────────────────────────────┘
  801.                                                              
  802. When the hangup command has been entered, the following will
  803. appear on the screen:
  804.  
  805.  
  806. Sample Session:
  807.  
  808. ┌───────────────────────────────────────────────────────────────┐
  809. │ annex: hangup                                                 │
  810. │                                                               │
  811. │ Resetting line and disconnecting.                             │
  812. │                                                               │
  813. │                                                               │
  814. │ Annex Command Line Interpreter * Copyright 1988 Xylogics      │
  815. │ annex:                                                        │
  816. │ DISCONNECTED                                                  │
  817. └───────────────────────────────────────────────────────────────┘
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825. 1.10  Changing the Password
  826.  
  827. The following command will change the password.
  828.                                                                  
  829. ╔═══════════════════════════════════════════════════════════════╗
  830. ║    Command Format:     passwd                                 ║
  831. ╚═══════════════════════════════════════════════════════════════╝
  832.  
  833. You will be prompted to enter the existing password (this
  834. question is skipped if you don't have a password).  Next you will
  835. be prompted to enter the new password.  You will then be asked to
  836. enter the new password again.  This will verify that you have not
  837. made a typographical error.  If the two entries are the same, the
  838. password will be changed.  The new password must meet the
  839. following criteria:
  840.  
  841.        NOTE: Some of these items are configurable by the system
  842.        administrator and these reflect the settings for the Denver
  843.        Multimax only.
  844.  
  845.        1.     Each password must have at least six characters.  Only
  846.               the first eight characters are significant.
  847.  
  848.        2.     Each password must contain at least two alphabetic
  849.               characters and at least one numeric or special
  850.               character.  Alphabetic characters can be upper or lower
  851.               case.
  852.  
  853.        3.     Each password must differ from the login name and
  854.               any reverse or circular shift of that login name. 
  855.               For comparison purposes, an upper case letter and
  856.               its corresponding lower case letter are
  857.               equivalent.
  858.  
  859.        4.     A new password must differ from the old by at
  860.               least three characters.  For comparison purposes,
  861.               an upper case letter and its corresponding lower
  862.               case character are equivalent.
  863. Passwords on the Multimax have a thirteen-week expiration period.
  864. At the end of the thirteen weeks, you will be required to change
  865. your password.  Once you have changed the password, you cannot
  866. change it again for two weeks.  This prevents you from
  867. immediately changing back to the old password and eliminates a
  868. possible security violation.  If you try to change the password
  869. before two weeks have passed since the last change, a warning
  870. message will be displayed.
  871.  
  872.  
  873. Sample Session:
  874.  
  875. ┌───────────────────────────────────────────────────────────────┐
  876. │ $passwd                                                       │
  877. │ Changing password for teacher                                 │
  878. │ Old password: secret                                          │
  879. │ Sorry: < 2 weeks since the last change                        │
  880. │ $                                                             │
  881. └───────────────────────────────────────────────────────────────┘
  882.  
  883. NOTE:         This is about as friendly as UMAX will ever get.
  884.  
  885. Try to choose a password that is not easy for someone else to
  886. guess.  The increasing number of computer crimes involving thefts
  887. all point to a need for protecting the system from unauthorized
  888. access.  Do not use words like your birthdate, telephone number,
  889. spouse's name, child's name, etc. for passwords.  Although you
  890. may think passwords are an unnecessary nuisance, they are an
  891. important way to strengthen the security of the computer system.
  892.  
  893.  
  894. 1.11  On-line Manual
  895.  
  896.  
  897. The major source of on-line help is in the form of documentation
  898. known as the on-line manual pages.  The pages are divided into
  899. eight sections.  Section 1 contains entries for UMAX user
  900. commands; the other sections describe administrative tools,
  901. library functions, games, and internal system structure and
  902. calls.
  903.  
  904. To gain access to the on-line manual pages enter the following
  905. command:
  906.  
  907. ╔═══════════════════════════════════════════════════════════════╗
  908. ║      Command Format:   man <command>                          ║
  909. ║                                                               ║
  910. ║      command - the UNIX command you want information about    ║
  911. ╚═══════════════════════════════════════════════════════════════╝
  912.  
  913. NOTE:         The name 'man' stands for manual.
  914.  
  915.  
  916. Example:
  917.  
  918. .................................................................
  919. . $man ls                                                       .
  920. .................................................................
  921.                                                                  
  922.  
  923. This command will display the on-line manual pages for the ls
  924. command.
  925.  
  926. The on-line manual pages entry begins with the command name and a
  927. one line summary followed by a synopsis of the command line
  928. syntax.  Optional flags and arguments are enclosed by square
  929. brackets [].  A detailed description of the command and all of
  930. its options and arguments follow the synopsis.  The description
  931. can include helpful examples.  At the conclusion of the entry,
  932. related files and commands are listed.
  933.  
  934. NOTE:         Most on-line manual pages will fill more than one
  935.               screen.  Be sure to control the output to your screen.
  936. 1.12 who and finger Commands
  937.  
  938. Once you have logged onto the Multimax, you can find out who is
  939. logged on the system with the following commands:
  940.                                                                  
  941. ╔═══════════════════════════════════════════════════════════════╦
  942. ║  Command Format:  who [options]                               ║
  943. ║                                                               ║
  944. ║    options - see man pages for a complete list                ║ 
  945. ║                                                               ║
  946. ╚═══════════════════════════════════════════════════════════════╝
  947.                                                                  
  948. The default output (no options) of the who command lists the
  949. user's login name, terminal line, and the time that the user
  950. logged in.
  951.  
  952.  
  953. Sample Session:
  954.  
  955. ┌───────────────────────────────────────────────────────────────┐
  956. │ $who                                                          │
  957. │ jwheeler          ttyp0     Aug 15 10:26                      │
  958. │ mvlsdba           rt02190   Aug 15 09:25                      │
  959. │ teacher           rt020b0   Aug 15 11:07                      │
  960. │ eholderf          rt021c0   Aug 15 11:03                      │
  961. │ dbowman           rt01150   Aug 15 08:58                      │
  962. │ $                                                             │
  963. └───────────────────────────────────────────────────────────────┘
  964.  
  965. Options will display other information about the users that are
  966. currently logged onto the system.  Some items available are the
  967. amount of time that has elapsed since activity occurred on that
  968. line, the process identifier (PID) of the login process,
  969. comments, and exit information.
  970. A UNIX command that provides a little more information about
  971. users that are logged in the system is the finger command.
  972.  
  973. ╔═══════════════════════════════════════════════════════════════╗
  974. ║  Command Format:  finger [options] [user1]                    ║
  975. ║                                                               ║
  976. ║    options - see on line manual for complete list             ║
  977. ║                                                               ║
  978. ║     user1  - login name                                       ║
  979. ╚═══════════════════════════════════════════════════════════════╝
  980.  
  981. The finger command with no options will list the login name, full
  982. name, terminal name, write status (an asterisk (*) before the
  983. terminal name indicates that write permission is denied), idle
  984. time, login time, office location, and phone number (if known)
  985. for each user that is currently logged in the system.
  986.  
  987.  
  988. Sample Session:
  989.                                                                  
  990. ┌───────────────────────────────────────────────────────────────┐
  991. │ $finger                                                       │
  992. │ Login        Name           TTY       Idle   When     Office  │
  993. │ Jwheeler     Jim Wheeler    ttyp0       16 Wed 10:26   MP     │
  994. │ mvlsdba      Motor Veh Lic  rt02190     16 Wed 09:25   d7160  │
  995. │ teacher      Teacher Acct  *rt020b0        Wed 11:07          │
  996. │ eholderf     Eileen Holder  rt021c0      1 Wed 11:03          │
  997. │ dbowman      Dale Bowman    rt01150        Wed 08:58          │
  998. │ $                                                             │
  999. └───────────────────────────────────────────────────────────────┘
  1000. Workshop 1
  1001.  
  1002.  
  1003. This workshop will reinforce your understanding of the ideas
  1004. presented in Chapter 1.  Each student is to complete the entire
  1005. workshop.
  1006.  
  1007. DESK EXERCISES
  1008.  
  1009.  
  1010. 1.     What two organizations first developed UNIX?
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016. 2.     In what high level programming language is UNIX written?
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022. 3.     What are some characteristics of UNIX?
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028. 4.     What is Encore Computer Corporations implementation of UNIX
  1029.        called?
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035. 5.     What part of UNIX controls the details of the computer's
  1036.        internal operations?
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042. 6.     What part of UNIX allows the user to communicate with the
  1043.        computer? 
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.                                   Continue on the next page
  1052. 7.     What is the name of the tree-like structure under which all
  1053.        data is stored?
  1054.  
  1055.  
  1056.        
  1057.  
  1058. 8.     What is the name of the highest level directory?
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064. 9.     What symbol represents the highest level directory?
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070. 10.    What is the general syntax of a UNIX command?
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076. 11.    What is the most common form for listing options on a
  1077.        command line? 
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083. 12.    What character would you use to erase a character on the
  1084.        command line?
  1085.  
  1086.  
  1087.  
  1088.  
  1089. 13.    What character terminates the execution of a command?
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095. 14.    What is the default BourneShell prompt?
  1096.  
  1097.  
  1098.  
  1099.  
  1100.                                               
  1101. 15.    How can you control the flow of output to your monitor
  1102.        screen?
  1103.  
  1104.  
  1105. 1.     What annex command is entered to make a connection to the
  1106.        Multimax?
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112. 2.     What is the UNIX command to change the password?
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119. 3.     How long is your password valid?
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. 4.     How long do you have to wait before changing your password
  1127.        again?  Why?
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133. 5.     What UNIX command is used to logout of the Multimax?
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140. 6.     What is the command to logout of the annex?
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146. COMPUTER EXERCISES
  1147.  
  1148. 7.     Login to the Multimax  
  1149.  
  1150.  
  1151.        a.     What did you notice when you entered the password?
  1152.  
  1153.  
  1154.  
  1155.  
  1156.        b.     Can you see the password as you enter it?
  1157.  
  1158.  
  1159.  
  1160.  
  1161.        c.     What happens if you make a mistake while entering the
  1162.               password?
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168. 8.     What do you see once you have logged in?  Write it here.
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177. 9.     Enter the command which displays the man pages for the man
  1178.        command.  (Don't forget to control output to the screen.) 
  1179.  
  1180.  
  1181.        The first section is titled "NAME," what are the titles of
  1182.        the other sections?
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191. 10.    What are the options for the man command?
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198. 11.    Enter the command to find out who (hint) is logged into the
  1199.        system.
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205. 12.    What command will give you more information about the
  1206.        current users?  Try it.
  1207.  
  1208.  
  1209.  
  1210. 13.    Logout of the Multimax and the Annex.
  1211.  
  1212. 2.  FILES
  1213.  
  1214.  
  1215. In UNIX, all data is organized in files.  An ordinary file is a
  1216. memo, source code program or shell script.  A shell script or
  1217. program source code can be viewed or edited from your terminal. 
  1218. Other files contain binary data, like programs for the kernel;
  1219. these files cannot be viewed or edited on the terminal.
  1220.  
  1221. Peripheral devices such as disks, tape drives, printers, and
  1222. terminals are also assigned file names.  Device files are
  1223. considered to be special files.  They have 'special'
  1224. characteristics.  Although input and output can be redirected to
  1225. and from a special file, do not attempt to display the contents
  1226. of a special file on your terminal.
  1227. 3.1  File Access Modes
  1228.  
  1229.  
  1230. File access modes are the protections that can be assigned to
  1231. files.  This protection can protect your files from unauthorized
  1232. reading or writing.  You can even protect your files from
  1233. yourself (you can prevent accidental deletion).
  1234.  
  1235. There are three access modes for files:
  1236.  
  1237.        r (read) read, examine, copy data in a file
  1238.  
  1239.        w (write) modify, delete a file
  1240.  
  1241.        x (execute) use the file as a command
  1242.  
  1243.  
  1244. Users with access to a file fall into one of three groups:
  1245.  
  1246.        u (user) the file's owner 
  1247.  
  1248.        g (group) users in the same group
  1249.  
  1250.        o (other) everybody else
  1251.  
  1252.  
  1253. The first output field of the ls -l command is a ten character
  1254. field.  Characters two through ten describe the file access
  1255. modes.  A typical access mode listing looks like:
  1256.  
  1257.                             rwxr-xr-x
  1258.  
  1259. Of the nine columns, the first three describe modes for the
  1260. file's owner, the next three for his group, and the last three
  1261. for everyone else.  Within each group of three, the first column
  1262. describes read access mode, the second write, and the third
  1263. execute.  A letter in a column indicates access granted, a dash
  1264. (-) indicates access denied.
  1265.  
  1266. Using the previous example, the user has r (read), w (write), and
  1267. x (execute) permissions.  Members of the user's logical group can
  1268. read (r) or execute (x).  Everyone else has read (r) and execute
  1269. (x)  permissions, too.  The effect of these permissions is that
  1270. the file's owner is the only one who can modify the file; but
  1271. everyone can examine, copy, or execute the file.
  1272. To change access modes on a file or directory, use the chmod
  1273. command.
  1274.  
  1275. ╔═══════════════════════════════════════════════════════════════╗
  1276. ║  Command Format:  chmod <access> <file1[filen]>               ║
  1277. ║                                                               ║
  1278. ║        access    - access permissions                         ║
  1279. ║     file1[filen] - one or more files to change permissions    ║
  1280. ╚═══════════════════════════════════════════════════════════════╝
  1281.  
  1282. Access can be expressed in either of two forms:
  1283.  
  1284.        -      with letters: [ugo] [+-=] [rwx]
  1285.  
  1286.        -      with numbers: [0-7] [0-7] [0-7]
  1287.  
  1288. Let's look at the method of changing the file permissions with
  1289. letters.  The letters u, g, and o represent user, group, and
  1290. others, respectively.  The + (plus) sign means to add the
  1291. permission and the - (minus) sign means to remove the permission.
  1292. The = (equal) sign means to set the permissions as shown.  Of
  1293. course, r,w, and x are read, write, and execute.
  1294.  
  1295. If, for illustration purposes, we created a file named file1 that
  1296. had the following permissions:
  1297.  
  1298.                      rw-rwxrwx
  1299.  
  1300. and you want to give yourself (user) execute permission and take
  1301. away others' (others' here means group and everyone else) write
  1302. permissions.
  1303.  
  1304.  
  1305. Sample Session:
  1306.  
  1307. ┌───────────────────────────────────────────────────────────────┐
  1308. │ $chmod u+x,g-w,o-w file1                                      │
  1309. │ $                                                             │
  1310. └───────────────────────────────────────────────────────────────┘
  1311.  
  1312. Now if we use the ls -la command, and look at the file
  1313. permissions for file1, they will look like this:
  1314.  
  1315.                      rwxr-xr-x
  1316. If you want to set several protections at once use the equal
  1317. sign.  The following example will set the permissions for the
  1318. user to read and execute.
  1319.  
  1320. Sample session:
  1321.  
  1322. ┌───────────────────────────────────────────────────────────────┐
  1323. │  $chmod u=rx file1                                            │
  1324. │  $                                                            │
  1325. └───────────────────────────────────────────────────────────────┘
  1326.  
  1327. The second method of changing the permissions is to use the octal
  1328. digits (0-7).  The octal digits 0 through 7 are represented in
  1329. binary in the following manner.
  1330.  
  1331.  
  1332.               Octal                Binary    Corresponds to permissions
  1333.  
  1334.                0                   000                  ---
  1335.                1                   001                  --x
  1336.                2                   010                  -w-
  1337.                3                   011                  -wx
  1338.                4                   100                  r--
  1339.                5                   101                  r-x
  1340.                6                   110                  rw-
  1341.                7                   111                  rwx
  1342.  
  1343.  
  1344. Notice that every time a one digit (1) occurs in the binary
  1345. number the corresponding permissions are also set.  Every time a
  1346. zero (0) occurs, the corresponding permission is denied.  So to
  1347. change the file permissions in the previous example, this is the
  1348. command to enter:
  1349.  
  1350.  
  1351. Sample Session:
  1352.  
  1353. ┌───────────────────────────────────────────────────────────────┐
  1354. │ $chmod 755 file1                                              │
  1355. │ $                                                             │
  1356. └───────────────────────────────────────────────────────────────┘
  1357.  
  1358. The first octal digit assigns user permissions of read, write and
  1359. execute.  The second digit assigns the group permission to read
  1360. and execute.  The last digit sets the others permission to read
  1361. and execute too.
  1362. 3.2  Listing Contents of Directories
  1363.  
  1364.  
  1365. The ls command is used to display file names and their
  1366. characteristics.  Since file names are stored in directories, ls
  1367. actually reads directory files.  Executing ls with no flags or
  1368. arguments simply lists the names of the files that exist in your
  1369. current working directory.  The initialization files will not be
  1370. listed.
  1371.  
  1372.  
  1373. ╔══════════════════════════════════════════════════════════════╗
  1374. ║   Command Format:  ls [options] [dir1[dirn]]                 ║
  1375. ║                                                              ║
  1376. ║    options - see man pages for a complete list               ║
  1377. ║                                                              ║
  1378. ║    dir1[dirn] - one or more directory names                  ║
  1379. ╚══════════════════════════════════════════════════════════════╝
  1380.  
  1381. The -a flag will cause the hidden (initialization) and all other
  1382. filenames to be displayed. 
  1383.  
  1384.  
  1385. The -C flag causes the output to be changed from single-column to
  1386. multi-column display. 
  1387.  
  1388.  
  1389. The -F flag adds a character to the end of each displayed
  1390. filename:
  1391.  
  1392.        /      indicates a directory
  1393.        *      indicates the file is executable.
  1394.    blank      indicates a plain or ordinary file
  1395.  
  1396.  
  1397. The -l flag causes detailed information to be printed for files
  1398. in the directory.  This information includes:
  1399.  
  1400.        file type (directory, block special, character special,
  1401.                 fifo special, symbolic link, or ordinary file)
  1402.        access modes
  1403.        number of links
  1404.        ownership  
  1405.      group affiliation
  1406.        size in bytes
  1407.        date and time of last modification
  1408.        filename
  1409. Without a filename argument, ls displays information about the
  1410. current working directory.  The output is automatically sorted
  1411. alphabetically by default. 
  1412.  
  1413.  
  1414. Example:
  1415.  
  1416. .................................................................
  1417. . $ls                                                           .
  1418. .................................................................
  1419.  
  1420. The following example provides a long listing of the current
  1421. working directory.
  1422.  
  1423. Example:
  1424.  
  1425. .................................................................
  1426. . $ls -l                                                        .
  1427. .................................................................
  1428.  
  1429.  
  1430. This example shows the ls command with no arguments so it uses
  1431. the default, the current working directory.  The argument could
  1432. be a relative or absolute directory name.
  1433.  
  1434. Sample session:
  1435.  
  1436. ┌───────────────────────────────────────────────────────────────┐
  1437. │ $ls -la                                                       │
  1438. │ total 975                                                     │
  1439. │ drwxrwxr-x  4 teacher   class   2048  Jul 16 17.56 .          │
  1440. │ drwxr-xr-x 60 root              1536  Jul 13 14:18 ..         │
  1441. │ -rwx------  1 teacher   class   4210  May  1 08:27 .profile   │
  1442. │ -rwxr-xr-x  1 teacher   class   1948  May 12 13:42 memo       │
  1443. │ $                                                             │
  1444. └───────────────────────────────────────────────────────────────┘
  1445.  
  1446. 3.3 File Classifications
  1447.  
  1448.  
  1449. The file command will classify files according to their contents.
  1450.  
  1451. ╔═══════════════════════════════════════════════════════════════╗
  1452. ║  Command Format:  file [options] <file1[filen]>               ║
  1453. ║                                                               ║
  1454. ║    file1[filen] - one or more filenames to analyze            ║
  1455. ╚═══════════════════════════════════════════════════════════════╝
  1456.  
  1457.  A few of the classifications that the file command displays are
  1458. shown below.  The results of using the file command are not
  1459. always correct.
  1460.  
  1461.        English text
  1462.        ascii text
  1463.        c program text
  1464.        cannot stat
  1465.        commands text
  1466.        data
  1467.        directory
  1468.        empty
  1469.        executable
  1470.  
  1471. Sample Session:
  1472.  
  1473. ┌───────────────────────────────────────────────────────────────┐
  1474. │ $file speople                                                 │
  1475. │ speople:                  commands text                       │
  1476. │ $file test                                                    │
  1477. │ test:                     directory                           │
  1478. │ $file mail                                                    │
  1479. │ mail:                     data                                │
  1480. │ $                                                             │
  1481. └───────────────────────────────────────────────────────────────┘
  1482.  
  1483.  
  1484. By convention, files beginning with a dot (.) are called
  1485. initialization files or 'hidden files'.  These files describe
  1486. your environment to the shell. They are sometimes called 'dot
  1487. files'. 
  1488.  
  1489. By convention, files that end with:
  1490.               
  1491.                 .c   are C source code programs
  1492.                 .f   are Fortran source code programs
  1493.                 .o   are object programs
  1494.                 .a   are archive files
  1495. 3.4  Displaying Files
  1496.  
  1497.  
  1498. The cat command displays the contents of a file.  The command cat
  1499. is an abbreviation for catenate. This command will read each file
  1500. in sequence and write it to the monitor screen. 
  1501.  
  1502. ╔═══════════════════════════════════════════════════════════════╗
  1503. ║  Command Format:  cat [options] [file1[filen]]                ║
  1504. ║                                                               ║
  1505. ║    options - see man pages for a complete list                ║
  1506. ║                                                               ║
  1507. ║    file1[filen] - one or more file names                      ║ 
  1508. ╚═══════════════════════════════════════════════════════════════╝
  1509.  
  1510.  
  1511. If no filename is given, or the argument - is encountered, cat
  1512. reads from standard input.
  1513.  
  1514. Sample session:
  1515.  
  1516. .................................................................
  1517. .   $cat                                                        .
  1518. .................................................................
  1519.  
  1520. This is the simpliest example but not very exciting.  The cat
  1521. command will get its input from the keyboard.  Everything that is
  1522. typed will be displayed on the monitor.
  1523.  
  1524. If an argument is given to the cat command that file will be
  1525. displayed on the monitor.
  1526.  
  1527. Sample session: 
  1528.  
  1529. ┌───────────────────────────────────────────────────────────────┐
  1530. │   $cat main.c                                                 │
  1531. │   main ()                                                     │
  1532. │   {                                                           │
  1533. │         printf ("hello from main!\n\n");                        │
  1534. │         printf ("calling function1!\n\n");                      │
  1535. │       funct1();                                               │
  1536. │       printf ("back from function1!\n\n");                    │
  1537. │         printf ("calling function2!\n\n");                      │
  1538. │         funct2();                                               │
  1539. │         printf ("that's it!\n\n");                              │
  1540. │   }                                                           │
  1541. │   $                                                           │ 
  1542. └───────────────────────────────────────────────────────────────┘
  1543. Several files can be displayed on the monitor one after the other
  1544. by separating the filenames with a space.
  1545.  
  1546. Sample session:
  1547.  
  1548. ┌───────────────────────────────────────────────────────────────┐
  1549. │    $cat main.c main.f                                         │
  1550. │    main ()                                                    │
  1551. │    {                                                          │
  1552. │           printf ("hello from main!\n\n");                      │
  1553. │           printf ("calling function1!\n\n");                    │
  1554. │           funct1();                                             │
  1555. │           printf ("back from function1!\n\n");                  │
  1556. │           printf ("calling function2!\n\n");                    │
  1557. │           funct2();                                             │
  1558. │           printf ("that's it!\n\n");                            │
  1559. │     }                                                         │ 
  1560. │             program calling                                   │ 
  1561. │         write(6,100)                                          │
  1562. │     100     format('Hello from main!',/)                          │
  1563. │           write(6,110)                                          │
  1564. │     110     format(' Calling subroutine1!',/)                     │
  1565. │             call sub1                                             │
  1566. │           write(6,120)                                          │
  1567. │     120     format(t15' Back from subroutine1!',/)                │
  1568. │           write(6,130)                                          │
  1569. │     130     format(' Calling subroutine2!',/)                     │
  1570. │           call sub2                                             │
  1571. │           write(6,140)                                          │
  1572. │     140     format(t15' Back from subroutine2!',/)                │
  1573. │           write(6,150)                                          │
  1574. │     150     format(' Thats all, folks!')                          │
  1575. │           end                                                   │
  1576. │     $                                                         │
  1577. └───────────────────────────────────────────────────────────────┘
  1578.  
  1579. If the file contains more lines than can be displayed on the
  1580. screen the display will continue to scroll until the last line
  1581. has been displayed then the prompt will be redisplayed.  This can
  1582. be a problem if you intend to read the text.  Be prepared to stop
  1583. the screen so it can be read.
  1584. The pg command displays the contents of a file one screen at a
  1585. time.  It allows the user to perform string searches and to
  1586. scroll backwards.
  1587.  
  1588. ╔═══════════════════════════════════════════════════════════════╗
  1589. ║  Command Format:  pg [options] [file1[filen]]                 ║
  1590. ║                                                               ║
  1591. ║    options - see man pages for a complete list                ║
  1592. ║                                                               ║
  1593. ║    file1[filen] - one or more files to paginate               ║
  1594. ║                                                               ║
  1595. ╚═══════════════════════════════════════════════════════════════╝
  1596.                                                                  
  1597.                                                                  
  1598. Sample session:
  1599.                                                                               
  1600. ┌────────────────────────────────────────────────────────────────────────────┐
  1601. │                                                                            │
  1602. │   $pg memo                                                                 │
  1603. │   What's Happening                                                         │
  1604. │   by Pam Hajny                                                             │
  1605. │   Denver Office                                                            │
  1606. │                                                                            │
  1607. │   With IRM Training:                                                       │
  1608. │                                                                            │
  1609. .   A Reclamation-wide workshop was held in early October to                 .
  1610. .                                                                            .
  1611. .                                                                            .
  1612.                                                                              
  1613. │   three groups; CYBER, VAX, and other (PC/LAN, scientific,                 │
  1614. │   :                                                                        │
  1615. │                                                                            │
  1616. └────────────────────────────────────────────────────────────────────────────┘
  1617.  
  1618. Twenty three lines of the file will appear and the : (colon)
  1619. prompt will appear on the last line.  To have the next twenty
  1620. three line of the file appear, simply press (Ret).  If you don't
  1621. want to see anymore of the file, enter a q (for quit) and the
  1622. shell prompt will be redisplayed.
  1623. The following UNIX command is useful for viewing the end of a
  1624. file without having to display the entire file.
  1625.                     
  1626. ╔═══════════════════════════════════════════════════════════════╗
  1627. ║  Command Format:  tail [options] [file1]                      ║
  1628. ║                                                               ║
  1629. ║      options - see man pages for a complete list                ║
  1630. ║                                                               ║
  1631. ║    file1 - the file to display, if none is given use          ║
  1632. ║            standard input                                     ║
  1633. ╚═══════════════════════════════════════════════════════════════╝
  1634.  
  1635. The tail command displays the last 10 lines of file  by default. 
  1636. The tail command accepts a -N flag to display the last N lines.
  1637.  
  1638.  
  1639. Sample Session:
  1640.  
  1641. ┌────────────────────────────────────────────────────────────────────────────┐
  1642. │ $tail memo                                                                 │
  1643. │ data communication between the ASC IBM and other Reclamation computers.    │
  1644. │ Asynchronous communication can be accomplished with the same terminals     │
  1645. │ we use for other computer tasks, over the same lines and through the MICOM │
  1646. │ port selectors.  Currently, host-to-host communications is accomplished    │
  1647. │ over a line between the IBM and the CYBERs.  The software that supports    │
  1648. │ this communication is called NJEF.  Although the capability has been there │
  1649. │ for some time, we have recently been working with ASC personnel to         │
  1650. │ improve its reliability and accessibility.  For CYBER users, there is      │
  1651. │ an NJEF Users' Guide available which can be requested through the Hotline  │
  1652. │ (303) 236-4567.                                                            │
  1653. │ $                                                                          │
  1654. └────────────────────────────────────────────────────────────────────────────┘
  1655. 3.5  Removing Files
  1656.  
  1657.  
  1658. The rm command will remove the entries for one or more files from
  1659. a directory.  If an entry was the last link to the file, the file
  1660. will be destroyed.  Removal of a file requires write permission
  1661. to the directory itself, but neither read nor write permission to
  1662. the file itself.  The format for the rm command is:
  1663.           
  1664. ╔══════════════════════════════════════════════════════════════╗
  1665. ║    Command Format:  rm [options] <file1[filen]>              ║ 
  1666. ║                                                              ║ 
  1667. ║    options - see man pages for a complete list               ║
  1668. ║                                                              ║
  1669. ║    file1[filen] - one or more files to remove                ║ 
  1670. ╚══════════════════════════════════════════════════════════════╝ 
  1671.                                                                  
  1672.                                                                
  1673. Sample session:
  1674.  
  1675. ┌───────────────────────────────────────────────────────────────┐
  1676. │ $ls                                                           │
  1677. │ memo                                                          │
  1678. │ tdata                                                         │
  1679. │ subdir                                                        │
  1680. │ $rm memo                                                      │
  1681. │ $ls                                                           │
  1682. │ tdata                                                         │
  1683. │ subdir                                                        │
  1684. │ $                                                             │
  1685. └───────────────────────────────────────────────────────────────┘
  1686.  
  1687. The file memo has been deleted from the current working
  1688. directory. 
  1689. Multiple files can be deleted by separating the filenames with a 
  1690. space.
  1691.  
  1692. Sample session:
  1693.  
  1694. ┌───────────────────────────────────────────────────────────────┐
  1695. │ $ls                                                           │
  1696. │ memo                                                          │
  1697. │ tdata                                                         │
  1698. │ subdir                                                        │
  1699. │ $rm memo tdata                                                │
  1700. │ $ls                                                           │
  1701. │ subdir                                                        │
  1702. │ $                                                             │
  1703. └───────────────────────────────────────────────────────────────┘
  1704. 3.6  Printing Files
  1705.  
  1706.  
  1707. The lp command routes a file to a printer.
  1708.  
  1709. ╔═══════════════════════════════════════════════════════════════╗
  1710. ║  Command Format:  lp [-d<dest>] [-n<number>] [file1[filen]]   ║
  1711. ║                                                               ║
  1712. ║     des - destination (default set by administrator)      ║
  1713. ║                                                               ║
  1714. ║     number  - number of copies (default is 1)                 ║
  1715. ║                                                               ║
  1716. ║     file1[filen] - one or more files to be printed            ║
  1717. ╚═══════════════════════════════════════════════════════════════╝
  1718.  
  1719. If no file name is mentioned the standard input is assumed.  The
  1720. filename dash (-) stands for standard input and may be supplied
  1721. in conjunction with named files.  The order in which the
  1722. filenames appear is the order in which they will be printed.
  1723.        
  1724. The printers in Denver have the following destination names:
  1725.  
  1726.        Mannesman 910 laser printer - mtlzr
  1727.  
  1728.        Mannesman 600 line printer  - mt_600  (Denver default)
  1729.  
  1730. If no specific printer is given the default printer will be
  1731. selected. The following example will print one copy (default) of
  1732. the file called test_285 to the line printer (default).
  1733.  
  1734. Sample session:
  1735.  
  1736. ┌───────────────────────────────────────────────────────────────┐
  1737. │   $lp test_285                                                │
  1738. │   request id is mt_600-1271 (1 file)                          │
  1739. │   $                                                           │
  1740. └───────────────────────────────────────────────────────────────┘
  1741.  
  1742. It is possible to specify the printer as shown in the following
  1743. example. In this case, we specified the default printer.
  1744.  
  1745. Sample Session:
  1746.  
  1747. ┌───────────────────────────────────────────────────────────────┐
  1748. │ $lp -dmt_600 test_286                                         │
  1749. │ request id is mt_600-1272 (1 file)                            │
  1750. │ $                                                             │
  1751. └───────────────────────────────────────────────────────────────┘
  1752.  
  1753.  
  1754.  
  1755.  
  1756. To print two copies of a file called test_287 on the laser
  1757. printer in Building 53 in Denver, enter the following command:
  1758.  
  1759. Sample Session:
  1760.  
  1761. ┌───────────────────────────────────────────────────────────────┐
  1762. │ $lp -dmtlzr -n2 test_287                                      │
  1763. │ request id is mtlzr-1273 (1 file)                             │
  1764. │ $                                                             │
  1765. └───────────────────────────────────────────────────────────────┘
  1766. 3.7  Print Status
  1767.  
  1768.  
  1769. The lpstat command will print information about the current
  1770. status of the printer system.
  1771.  
  1772. ╔═══════════════════════════════════════════════════════════════╗
  1773. ║  Command Format:  lpstat [options]                            ║
  1774. ║                                                               ║
  1775. ║    options - see man pages for a complete list                ║
  1776. ║                                                               ║
  1777. ╚═══════════════════════════════════════════════════════════════╝
  1778.                                                                  
  1779. If no options are given, the lpstat command will print the status
  1780. of all requests made to lp by the user.
  1781.  
  1782.  
  1783. Sample Session:
  1784.  
  1785. ┌───────────────────────────────────────────────────────────────┐
  1786. │ $lpstat                                                       │
  1787. │ mtlzr-1274    teacher     22560    Jul 16 09:05 on mtlzr      │
  1788. │ $                                                             │
  1789. └───────────────────────────────────────────────────────────────┘
  1790.  
  1791. The first field is the remote id of the print job.  The username
  1792. is next and the size (in bytes) of the print file.  The date and
  1793. time are next and finally the name of the printer.
  1794.  
  1795. One of the options available is -t.  This option will print all
  1796. of the printer status information.
  1797.  
  1798.  
  1799. Sample Session:
  1800.  
  1801. ┌───────────────────────────────────────────────────────────────┐
  1802. │ $lpstat -t                                                    │
  1803. │ scheduler is running                                          │
  1804. │ system default destination: mt_600                            │
  1805. │ device for mt_600: /dev/rlp000                                │
  1806. │ device for mtlzr: /dev/rt0002                                 │
  1807. │ mt_600 accepting requests since Sep 19 16:09                  │
  1808. │ mtlzr accepting requests since Sep 19 16:43                   │
  1809. │ printer mt_600 is idle. enabled since Jul 3 16:52             │
  1810. │ printer mtlzr is idle. enabled since Jul 3 16:51              │
  1811. │ $                                                             │
  1812. └───────────────────────────────────────────────────────────────┘
  1813.  
  1814. This is an example of the kinds of information available from the
  1815. lpstat command.
  1816. 3.8  Canceling Print Jobs
  1817.  
  1818.  
  1819. The cancel command will cancel printer requests made by the lp
  1820. command.  The command line arguments can be either request id's
  1821. (these are returned by the lp command) or the printer name.  If
  1822. you specify the request id, the cancel command will stop the job
  1823. even if it is currently printing.  If you specify the printer
  1824. name, the job currently being printed will be canceled.  In
  1825. either case, the cancellation of a request that is currently
  1826. printing will free the printer to print the next request.
  1827.  
  1828.  
  1829. ╔═══════════════════════════════════════════════════════════════╗
  1830. ║     Command Format:     cancel <[ids] [printer]>              ║
  1831. ║                                                               ║
  1832. ║      ids - request ids (returned by lp command)               ║
  1833. ║                                                               ║
  1834. ║      printer - printer name                                   ║
  1835. ╚═══════════════════════════════════════════════════════════════╝
  1836.  
  1837.  
  1838. Sample Session:
  1839.  
  1840. ┌───────────────────────────────────────────────────────────────┐
  1841. │ $lp -dmt_600 contest                                          │
  1842. │ request id is mt_600-1280 (1 file)                            │
  1843. │ $cancel mt_600-1280                                           │
  1844. │ request "mt_600-1280" canceled                                │
  1845. │ $                                                             │
  1846. └───────────────────────────────────────────────────────────────┘
  1847. 3.9  Copying Files
  1848.  
  1849.  
  1850. A user may make a copy of a file if he has read access to that
  1851. file.  The cp command can be used to copy the contents of one
  1852. file to another.
  1853.  
  1854. ╔═══════════════════════════════════════════════════════════════╗
  1855. ║  Command Format:  cp <file1[filen]> <target>                  ║
  1856. ║                                                               ║
  1857. ║    file1[filen] - one or more source files                    ║
  1858. ║                                                               ║
  1859. ║    target       - file or dirname                             ║
  1860. ║                                                               ║
  1861. ║                  file1 and target cannot be the same and      ║
  1862. ║                  if the target is a file its' contents are    ║
  1863. ║                  destroyed.                                   ║
  1864. ║                                                               ║
  1865. ║                  If target is a directory, then the contents  ║
  1866. ║                  of the source file(s) is copied to that      ║ 
  1867. ║                  directory.                                   ║ 
  1868. ║                                                               ║
  1869. ╚═══════════════════════════════════════════════════════════════╝
  1870.  
  1871. Sample Session:
  1872.  
  1873. ┌───────────────────────────────────────────────────────────────┐
  1874. │ $cp contest memo                                              │
  1875. │ $                                                             │
  1876. └───────────────────────────────────────────────────────────────┘
  1877.  
  1878. This will cause a copy of the file contest to be made into a file
  1879. named memo.  If memo doesn't exist, it will be created.  If it
  1880. already exists, it will be written over.  The cp command is
  1881. nondestructive; that means that the source file will remain
  1882. intact.
  1883.  
  1884. The cp command can also be used to copy several files into
  1885. another directory.
  1886.  
  1887.  
  1888. Sample Session:
  1889.  
  1890. ┌───────────────────────────────────────────────────────────────┐
  1891. │ $cp file1 file2 /user0/teacher                                │
  1892. │ $                                                             │
  1893. └───────────────────────────────────────────────────────────────┘
  1894.  
  1895. A copy of file1 and file2 has been sent to the directory (in this
  1896. case, the target directory) /user0/teacher.  The user of cp will
  1897. own the newly copied files.
  1898. 3.10  Moving Files
  1899.  
  1900.  
  1901. A user may move a file only if he has write access to that file. 
  1902. The mv (move) command can be used to rename one file.
  1903.  
  1904.  
  1905. ╔═══════════════════════════════════════════════════════════════╗
  1906. ║  Command Format:  mv <file1[filen]> <target>                  ║
  1907. ║                                                               ║
  1908. ║    file1[filen] - one or more source files                    ║
  1909. ║                                                               ║
  1910. ║    target       - file or dirname                             ║
  1911. ║                                                               ║
  1912. ║                  file1 and target cannot be the same and      ║
  1913. ║                  if the target is a file its' contents are    ║
  1914. ║                  destroyed.                                   ║
  1915. ║                                                               ║
  1916. ║                  If target is a directory, then the contents  ║
  1917. ║                  of the source file(s) are moved to that      ║ 
  1918. ║                  directory.                                   ║ 
  1919. ║                                                               ║
  1920. ╚═══════════════════════════════════════════════════════════════╝
  1921.                                                                  
  1922.  
  1923. Sample Session:
  1924.  
  1925. ┌───────────────────────────────────────────────────────────────┐
  1926. │ $mv contest memo                                              │
  1927. │ $                                                             │
  1928. └───────────────────────────────────────────────────────────────┘
  1929.  
  1930. This will have the effect of changing the name of the file
  1931. contest into memo.  The permissions on the file will remain the
  1932. same.  The move command is destructive.  That means the source
  1933. file no longer exists.
  1934.  
  1935. The mv command can also be use to move files from one directory
  1936. to another.
  1937.  
  1938. Sample Session:
  1939.  
  1940. ┌───────────────────────────────────────────────────────────────┐
  1941. │ $mv file1 file2 /user0/teacher                                │
  1942. │ $                                                             │
  1943. └───────────────────────────────────────────────────────────────┘
  1944.  
  1945. The files, file1 and file2, have been sent to the directory
  1946. /user0/teacher.  They have been "moved" and no longer reside in
  1947. the current directory.  The owner remains the same when a file is
  1948. moved.
  1949. Workshop 3
  1950.  
  1951. This workshop will reinforce your understanding of the topics
  1952. presented in this chapter.  Login to the Multimax using the
  1953. username and password given to you by the instructor.  Each
  1954. student should complete the entire workshop.  You might need to
  1955. work in a team on the computer exercises.
  1956.  
  1957. DESK EXERCISES
  1958.  
  1959.  
  1960. 1.     List four types of files.
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967. 2.     What does the file command do?
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974. 3.     The ls command will display the contents of the current
  1975.        working directory.  What does the -F option do?
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981. 4.     What command is used to display the contents of an ordinary
  1982.        file?
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988. 5.     What command would you use to append one file to the end of
  1989.        another?
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995. 6.     What is the lp command?
  1996.  
  1997.  
  1998.  
  1999.  
  2000.                                   Continue on the next page
  2001. 7.     How can you find out the status of your print job?
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007. 8.     What command would you enter to cancel a print job called
  2008.        mt_600-1131?
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014. 9.     What command will copy the contents of one file to another?
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020. 10.    What does mv do?
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026. 11.    What do the following file protections indicate?
  2027.  
  2028.               rwx------
  2029.  
  2030.  
  2031.  
  2032.               rwxr-xr-x
  2033.  
  2034.  
  2035.  
  2036.               ---------
  2037.  
  2038.  
  2039.               rwxr--r--
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.                                   Continue on the next page
  2053. COMPUTER EXERCISES
  2054.  
  2055.  
  2056. 12.    Log into the Multimax.
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062. 13.    Execute the file command on the files listed below.  Record
  2063.        the output in the space provided.
  2064.  
  2065.  
  2066.        a.     .profile
  2067.  
  2068.  
  2069.  
  2070.        b.     /bin/vax
  2071.  
  2072.  
  2073.  
  2074.        c.     /dev/console
  2075.  
  2076.  
  2077.  
  2078.  
  2079. 14.    Which of the above files is readable?
  2080.  
  2081.  
  2082.  
  2083.  
  2084.  
  2085.  
  2086. 15.    Enter the command to display the contents of the current
  2087.        working directory.  Hint: ls
  2088.  
  2089.  
  2090.        a.     How many files are listed?
  2091.  
  2092.  
  2093.  
  2094.        b.     Type ls -a
  2095.  
  2096.  
  2097.  
  2098.        c.     How many entries are listed?
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.                                   Continue on the next page
  2105.        d.     Which entries were not listed in your original output
  2106.               of ls?
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114. 16.    How does the output of ls -a and ls -Ac differ? 
  2115.        Try it.
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122. 17.    How many fields are displayed for each entry when you
  2123.        execute ls -l? What are the fields?
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129. 18.    What are the current permissions on .profile?
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135. 19.    Change permissions on .profile so that no one (including
  2136.        you) has any access to the file.  
  2137.        (Hint: Use the chmod command)
  2138.  
  2139.  
  2140.  
  2141.  
  2142.  
  2143. 20.    Without changing the permissions, list the contents of the
  2144.        file named .profile to the screen.
  2145.        What happened?  Why?
  2146.  
  2147.  
  2148.  
  2149.  
  2150.  
  2151.  
  2152.  
  2153.  
  2154.  
  2155.  
  2156.                                   Continue on the next page
  2157. 21.    Change the permissions on .profile to 
  2158.  
  2159.               u - read, write, execute
  2160.               g - read
  2161.               o - read             
  2162.  
  2163.  
  2164.  
  2165.  
  2166. 22.    Type cat .profile.  What happened?  Do you know why?
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173. 23.    Enter pg memo.  What does this command do?
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181. 24.    Send one copy of the file called memo to the laser printer.
  2182.      
  2183.  
  2184.  
  2185.  
  2186.  
  2187.  
  2188. 25.    Logout of the Multimax and the Annex.
  2189.                                             NOTES
  2190. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2191. 4.  DIRECTORIES
  2192.  
  2193.  
  2194. A directory is a file whose sole job is to store file names and
  2195. related information.  All files, whether ordinary, special, or
  2196. directory, are contained in directories.
  2197.  
  2198. The directory in which you find yourself when you first login is
  2199. called your home directory.  You will be doing much of your work
  2200. in your home directory and subdirectories that you'll be creating
  2201. to organize your files.
  2202.  
  2203.  
  2204.  
  2205. 4.1  Absolute/Relative Pathnames
  2206.  
  2207.  
  2208. As we saw earlier, directories are arranged in a hierarchy with
  2209. root (/) at the top.  The position of any file within the
  2210. hierarchy is described by its pathname.  Elements of a pathname
  2211. are separated by a /.  A pathname is absolute if it is described
  2212. in relation to root, so absolute pathnames always begin with a /.
  2213. These are some example of absolute filenames.
  2214.  
  2215.               /etc/passwd
  2216.               /users/sjones/chem/notes
  2217.               /dev/rdsk/Os3
  2218.  
  2219. A pathname can also be relative to your current working
  2220. directory.  Relative pathnames never begin with /.  Relative to
  2221. user sjones' home directory, some pathnames might look like this:
  2222.                                                                  
  2223.               chem/notes
  2224.               personal/res
  2225.  
  2226. To determine where you are within the filesystem hierarchy at any
  2227. time, enter the command to print the current working directory.
  2228.  
  2229. ╔═══════════════════════════════════════════════════════════════╗
  2230. ║  Command Format:  pwd                                         ║
  2231. ╚═══════════════════════════════════════════════════════════════╝
  2232.  
  2233. Sample Session:
  2234.  
  2235. ┌───────────────────────────────────────────────────────────────┐
  2236. │ $pwd                                                          │
  2237. │ /user0/teacher                                                │
  2238. │ $                                                             │
  2239. └───────────────────────────────────────────────────────────────┘
  2240.  
  2241. Notice that this is an absolute pathname.  This is the pathname
  2242. of the current working directory.
  2243. 4.2  Creating Directories
  2244.  
  2245.  
  2246. Directories are created by the following command:
  2247.  
  2248. ╔═══════════════════════════════════════════════════════════════╗
  2249. ║  Command Format:  mkdir [options] <dirname>                   ║
  2250. ║                                                               ║
  2251. ║      options - see man pages for a complete list              ║
  2252. ║                                                               ║
  2253. ║      dirname -  name of the new directory (absolute or        ║
  2254. ║                    relative pathname).                        ║ 
  2255. ╚═══════════════════════════════════════════════════════════════╝
  2256.                                                                  
  2257. If the option to change permission mode is not given, the
  2258. directory will have default permissions set to read,write,execute
  2259. for the user and read and execute for group and others.  The
  2260. files . (dot) and .. (dot dot) are created automatically.  In
  2261. order to create a sub-directory, you must have write permission
  2262. on the parent directory.  The owner id and the group id are set
  2263. to the real users id and group id, respectively.
  2264.  
  2265. 4.3  Removing Directories
  2266.  
  2267.  
  2268. Directories can be deleted using the rmdir command.
  2269.  
  2270. ╔═══════════════════════════════════════════════════════════════╗
  2271. ║  Command Format:  rmdir  [options]  <dirname>                 ║
  2272. ║                                                               ║
  2273. ║    options - see man pages for a complete list                ║
  2274. ║                                                               ║
  2275. ║    dirname - the directory to remove, it must be empty.       ║
  2276. ║                                                               ║
  2277. ╚═══════════════════════════════════════════════════════════════╝
  2278.  
  2279. Sample Session:
  2280.  
  2281. ┌───────────────────────────────────────────────────────────────┐
  2282. │ $pwd                                                          │
  2283. │ /user0/teacher                                                │
  2284. │ $ls -la                                                       │
  2285. │ total 5                                                       │
  2286. │ drwxr-xr-x 2 teacher  class   512  Jul 18 08:12 .             │
  2287. │ drwxrwxr-x 5 root     root    2048 Jul  1 13:14 ..            │
  2288. │ $rmdir teacher                                                │
  2289. │ rmdir:teacher:Directory does not exist                        │
  2290. │ $                                                             │
  2291. └───────────────────────────────────────────────────────────────┘
  2292.  
  2293.  
  2294. Normally, directories are deleted using the rmdir command. 
  2295. Before the directory can be removed, it must be empty; that is,
  2296. it must not contain any files.  Notice that in the above example
  2297. two files are present, . (dot) and .. (dot).  Remember, these
  2298. refer to the current working directory and its parent.  They
  2299. cannot be removed.
  2300. Sample Session:
  2301.  
  2302. ┌───────────────────────────────────────────────────────────────┐
  2303. │ $rmdir .                                                      │
  2304. │ rmdir: .: Can't remove current directory or ..                │
  2305. │ $                                                             │
  2306. └───────────────────────────────────────────────────────────────┘
  2307.  
  2308. For the purposes of deleting a directory, the directory is empty
  2309. if it contains only two files, namely . (dot) and .. (dot dot).
  2310. 4.4  Changing Directories
  2311.  
  2312.  
  2313. To "move around" in the filesystem, use the cd (change directory)
  2314. command.
  2315.  
  2316. ╔═══════════════════════════════════════════════════════════════╗
  2317. ║  Command Format:  cd [dirname]                                ║
  2318. ║                                                               ║
  2319. ║  dirname  -    If not specified, the value of the $HOME       ║
  2320. ║                shell variable will be used as the new         ║
  2321. ║                current working directory.                     ║
  2322. ║                                                               ║
  2323. ║                If the directory given is an absolute pathname ║
  2324. ║                that directory is the new current working      ║
  2325. ║                directory.  A relative pathname can also be    ║
  2326. ║                given.                                         ║
  2327. ╚═══════════════════════════════════════════════════════════════╝
  2328.  
  2329.  
  2330. Sample Session:
  2331.  
  2332. ┌───────────────────────────────────────────────────────────────┐
  2333. │ $cd /user0/teacher                                            │
  2334. │ $pwd                                                          │
  2335. │ /user0/teacher                                                │
  2336. │ $                                                             │
  2337. └───────────────────────────────────────────────────────────────┘
  2338.  
  2339. The current working directory is now /user0/teacher.
  2340.  
  2341.  
  2342. Sample Session:
  2343.  
  2344. ┌───────────────────────────────────────────────────────────────┐
  2345. │ $cd memos                                                     │
  2346. │ $pwd                                                          │
  2347. │ /user0/teacher/memos                                          │
  2348. │ $                                                             │
  2349. └───────────────────────────────────────────────────────────────┘
  2350.  
  2351. This command will look for a subdirectory called memos under the
  2352. current working directory.  If it is found, it will become the
  2353. new working directory; otherwise, an error will occur.
  2354.  
  2355. Error messages beginning with "cannot access file..." often
  2356. indicate that the pathname is incorrect or misspelled.
  2357. 4.5  Renaming Directories
  2358.  
  2359.  
  2360. The mv (move) command can also be used to rename a directory.
  2361.  
  2362. ╔═══════════════════════════════════════════════════════════════╗
  2363. ║  Command Format:  mv <dirname> <target>                       ║
  2364. ║                                                               ║
  2365. ║    dirname   - name of the source directory                   ║
  2366. ║    target    - target directory name                          ║
  2367. ╚═══════════════════════════════════════════════════════════════╝
  2368.  
  2369.  
  2370. Sample Session:
  2371.  
  2372. ┌───────────────────────────────────────────────────────────────┐
  2373. │ $mv users newusers                                            │
  2374. │ $                                                             │
  2375. └───────────────────────────────────────────────────────────────┘
  2376.  
  2377.  
  2378. This will have the effect of changing the name of the directory
  2379. users into newusers.  The permissions on the directory will
  2380. remain the same.
  2381.  
  2382.  
  2383. NOTE:         All files and subdirectories in the directory newusers
  2384.               now have new absolute pathnames. 
  2385. 4.6  The directories . (dot) and .. (dot dot)  
  2386.  
  2387.  
  2388. The filename . (dot) represents the current working directory;
  2389. and the filename .. (dot dot) represent the directory one level
  2390. above the current working directory, often referred to as the
  2391. parent directory.  If we enter the command to show a listing of
  2392. the current working directories files and use the -a option to
  2393. list all the files and the -l option provides the long listing,
  2394. this is the result.
  2395.  
  2396.                
  2397. Sample Session:
  2398.  
  2399. ┌───────────────────────────────────────────────────────────────┐
  2400. │ $ls -la                                                       │
  2401. │ total 975                                                     │
  2402. │ drwxrwxr-x  4 teacher   class   2048  Jul 16 17.56 .          │
  2403. │ drwxr-xr-x 60 root              1536  Jul 13 14:18 ..         │
  2404. │ ----------  1 teacher   class   4210  May  1 08:27 .profile   │
  2405. │ -rwxr-xr-x  1 teacher   class   1948  May 12 13:42 memo       │
  2406. │ $                                                             │
  2407. └───────────────────────────────────────────────────────────────┘
  2408.                                                                  
  2409. The ls -la command displays access modes, number of links, the
  2410. owner, the group, size, etc. of files in a directory; but also
  2411. displays the characteristics of the current working directory and
  2412. its parent.  The first entry is the entry for the current
  2413. directory.  The owner is teacher and the group is class.  The
  2414. second entry is the parent directory.  It is one level up from
  2415. the current working directory.  It is owned by the root
  2416. directory.
  2417.  
  2418. Instead of asking for information on all of the files in a
  2419. directory, you can request just the information on the current
  2420. working directory.
  2421.  
  2422.  
  2423. Sample Session:
  2424.  
  2425. ┌───────────────────────────────────────────────────────────────┐
  2426. │ $ls -ld                                                       │
  2427. │ drwxrwxr-x  4  teacher   class  2048 Jul 16 17:56 .           │
  2428. │ $                                                             │
  2429. └───────────────────────────────────────────────────────────────┘
  2430.  
  2431. The response from the command simply shows the long information
  2432. for the current working directory . (dot).
  2433. Information can also be obtained for the parent of the current
  2434. working directory by using its name as an argument.
  2435.  
  2436.  
  2437. Sample Session:
  2438.  
  2439. ┌───────────────────────────────────────────────────────────────┐
  2440. │ $ls -ld ..                                                    │
  2441. │ drwxr-xr-x  60  root  root  1536  Jul 13 14:18 ..             │
  2442. │ $                                                             │
  2443. └───────────────────────────────────────────────────────────────┘
  2444.  
  2445. Here's the long list of the current working directories parent.
  2446. (.. is the shorthand representation of the current working
  2447. directories parent) 
  2448.                                                                  
  2449. Both of the directory names . (dot) and .. (dot dot) can be used
  2450. as arguments to commands.  To change the parent of the current
  2451. working directory into the current working directory, the command
  2452. is:                                                              
  2453.  
  2454.  
  2455. Sample Session:
  2456.  
  2457. ┌───────────────────────────────────────────────────────────────┐
  2458. │ $pwd                                                          │
  2459. │ /user0/teacher                                                │
  2460. │ $cd ..                                                        │
  2461. │ $pwd                                                          │
  2462. │ /user0                                                        │
  2463. │ $                                                             │
  2464. └───────────────────────────────────────────────────────────────┘
  2465.  
  2466. The current working directory is the former parent.
  2467.  
  2468. This is all very interesting but what good is it?  You can
  2469. specify the current working directory or its parent without
  2470. typing the entire absolute pathname.  It can also be handy when
  2471. giving arguments to UNIX commands.  
  2472.  
  2473. Why are the pathnames sjones/chem and ./sjones/chem equivalent?
  2474. 4.7  Directory Access Modes
  2475.  
  2476.  
  2477. Directory access modes are listed and organized in the same
  2478. manner as any other file.  There are a few differences that need
  2479. to be mentioned.
  2480.  
  2481.  
  2482.  
  2483. 4.7.1  Read
  2484.  
  2485.  
  2486. Access to a directory means that the user can read the contents.
  2487. The user can look at the filenames inside the directory.
  2488.  
  2489.  
  2490.  
  2491. 4.7.2  Write
  2492.  
  2493.  
  2494. Access means that the user can add or delete files to the
  2495. contents of the directory.
  2496.  
  2497.  
  2498.  
  2499. 4.7.3  Execute
  2500.  
  2501.  
  2502. Executing a directory doesn't really make a lot of sense so think
  2503. of this as a traverse permission.  This access allows the user to
  2504. reference the directory name in a command.  The reference is not
  2505. necessarily explicit, since the shell deduces the absolute
  2506. pathname of a command from the user's environment.  For example,
  2507. the shell knows that the full pathname of the ls command is
  2508. /bin/ls.  A user must have execute access to the bin directory in
  2509. order to execute ls.
  2510.  
  2511. If traverse permissions are denied, others cannot change to it or
  2512. through it.  Another user can't do a cd to the protected
  2513. directory or any subdirectory beneath it.
  2514.                                                                    IN CLASS QUIZ
  2515.                                                                     ┌────────┐
  2516.                                                                     │ /      │  
  2517.                                                                     └────┬───┘                                                                       
  2518.                                                                          │ 
  2519.                             ┌──────────────┬──────────────┬──────────────┴───────────┬──────────────┬──────────────┐
  2520.                             │              │              │                          │              │              │
  2521.                        ┌────┴─────┐   ┌────┴────┐    ┌────┴────┐                ┌────┴────┐    ┌────┴────┐    ┌────┴────┐  
  2522.                        │   bin    │   │   tmp   │    │   etc   │                │   mnt   │    │   lib   │    │   dev   │  
  2523.                        └──────────┘   └─────────┘    └─────────┘                └────┬────┘    └─────────┘    └─────────┘  
  2524.                                                                                      │          
  2525.                    ┌──────────────────────────────────────┬──────────────────────────┴───────┬──────────────────────────────────┐
  2526.                    │                                      │                                  │                                  │
  2527.              ┌─────┴─────┐                           ┌────┴────┐                        ┌────┴────┐                        ┌────┴────┐
  2528.              │   Uni1    │                           │  Uni2   │                        │  Uni3   │                        │  Uni4   │
  2529.              └─────┬─────┘                           └────┬────┘                        └────┬────┘                        └────┬────┘  
  2530.  {1} ┌─────────────┼────────────┐                 ┌───────┴────────┐             ┌───────────┼───────────┐               ┌──────┴─────┐
  2531. ┌────┴─────┐ ┌─────┴─────┐ ┌────┴────┐      ┌─────┴─────┐    ┌─────┴─────┐  ┌────┴────┐ ┌────┴────┐ ┌────┴────┐     ┌────┴────┐  ┌────┴────┐
  2532. │  filea   │ │  fileb    │ │  Dira   │      │   filea   │    │   Filea   │  │  file1  │ │  File2  │ │  file3  │{5}  │   Dir1  │  │   Dir2  │
  2533. └──────────┘ └───────────┘ └────┬────┘      └───────────┘    └─────┬─────┘  └─────────┘ └────┬────┘ └─────────┘     └─────┬───┘  └────┬────┘
  2534.                                 │                                  │                         │                            │           │ 
  2535.      ┌─────────────┬────────────┤                                  │                         │               ┌────────────┤           │
  2536. ┌────┴─────┐ ┌─────┴─────┐ ┌────┴────┐                       ┌─────┴─────┐              ┌────┴────┐     ┌────┴────┐  ┌────┴────┐ ┌────┴────┐
  2537. │  filea   │ │    Dirb   │ │  fileb  │ {2}               {3} │   filea   │              │  Filea  │  {6}│ File1a  │  │ file1b  │ │ Dir2a   │
  2538. └──────────┘ └───────────┘ └─────────┘                       └───────────┘              └────┬────┘     └─────────┘  └─────────┘ └────┬────┘
  2539.                                                                                              │                                        │
  2540. Write the complete pathname for the     5.  ________________________________            ┌────┴────┐                            ┌──────┴──────┐ {7} 
  2541. files numbered above.                                                               {4} │  filea  │                       ┌────┴────┐   ┌────┴────┐
  2542.                                         6.  ________________________________            └─────────┘                       │ File2aa │   │ file2ab │
  2543. 1.  _______________________________                                               8.  You are in /mnt/Uni1 and want #1.   └─────────┘   └─────────┘
  2544.                                         7.  ________________________________          
  2545. 2.  _______________________________                                                   ______________________________________          
  2546.                                                                                       
  2547. 3.  _______________________________     Write the minimum pathname needed for     9.  You are in /mnt/Uni3/File2 and want #4
  2548.                                         each of the following:                        
  2549. 4.  _______________________________                                                   ______________________________________ 
  2550. 4.7.4  Typical Root Directory
  2551.  
  2552.  
  2553. ┌──────────────────────────────────────────────────────────────────────────────────────────┐
  2554. │ $ ls -FC /                                                                               │
  2555. │                                                                                          │
  2556. │                                                                                          │
  2557. │ Student/           bin/             lib/           stand/            u2/         user2/  │
  2558. │                                                                                          │
  2559. │ Students/          bad/             lisp/          tmp/              unix*       usr/    │
  2560. │                                                                                          │
  2561. │ Support/           dev/             lost+found/    tmp.sh            unix.bak*   usr2/   │
  2562. │                                                                                          │
  2563. │ etc/               mnt/             tmp1/          unix.test*        usr3/       a.out*  │
  2564. │                                                                                          │
  2565. │ foo                rel_notes        tmp2/          user0/            install/    shlib/  │
  2566. │                                                                                          │
  2567. │ u1/                user1/                                                                │
  2568. └──────────────────────────────────────────────────────────────────────────────────────────┘
  2569.                                             NOTES
  2570. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2571. Workshop 4
  2572.  
  2573.  
  2574. This workshop will reinforce your understanding of the topics
  2575. presented in this chapter.  Login to the Multimax using the
  2576. username and password from the previous workshop.  All students
  2577. should complete the entire workshop.  You may need to work in a
  2578. team on the computer exercises.
  2579.  
  2580. DESK EXERCISES
  2581.  
  2582.  
  2583. 1.     What is a directory?
  2584.  
  2585.  
  2586.  
  2587.  
  2588. 2.     What is an absolute path name?
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594. 3.     What is a relative path name?
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600. 4.     What command will create a directory?
  2601.  
  2602.  
  2603.  
  2604.  
  2605. 5.     What command will remove a directory?
  2606.  
  2607.  
  2608.  
  2609.  
  2610. 6.     What command is used to change from one directory to
  2611.        another?
  2612.  
  2613.  
  2614.  
  2615.  
  2616. 7.     How would you change the name of a directory?
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.                                   Continue on the next page
  2623. 8.     What do the files . (dot) and .. (dot dot) represent?
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630. 9.     What does execute permission on a directory mean?
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637. COMPUTER EXERCISES
  2638.  
  2639.  
  2640. 10.    Login to the Multimax.
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646. 11.    What is the absolute pathname of your current working
  2647.        directory? Hint: pwd
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653. 12.    Type cd etc
  2654.  
  2655.        What message do you get? Can you explain why?
  2656.  
  2657.  
  2658.  
  2659.  
  2660. 13.    Type cd /etc
  2661.  
  2662.        What is your current working directory?  Why did this
  2663.        happen?
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669. 14.    Enter the command that will return you to your home
  2670.        directory.
  2671.  
  2672.  
  2673.  
  2674.                                   Continue on the next page
  2675.  
  2676. 15.    Enter the command that will change to your current working
  2677.        directories parent.
  2678.  
  2679.  
  2680.  
  2681.  
  2682.  
  2683.  
  2684. 16.    List the contents of your current working directory
  2685.  
  2686.  
  2687.  
  2688.  
  2689.  
  2690. 17.    List the permissions, ownership, size, etc. of your current
  2691.        directories parent.
  2692.  
  2693.  
  2694.  
  2695.  
  2696.  
  2697. 18.    Enter the command to change to your home directory.  Create
  2698.        a new subdirectory with a name of your choice.
  2699.  
  2700.  
  2701.  
  2702.  
  2703.  
  2704. 19.    Change the current working directory to the subdirectory you
  2705.        just created.
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711. 20.    Rename the subdirectory to Student.  Is this the same
  2712.        subdirectory as everyone else in the class?  Why?
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718. 21.    Change to your home directory and delete the subdirectory
  2719.        Student.
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725. 22.    Logout of the Multimax and the Annex.
  2726.                                             NOTES
  2727. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  2728. 5.  COMMUNICATION UTILITIES
  2729.  
  2730.  
  2731. This chapter will deal with the utilities that allow one user to
  2732. communicate with another.  Some of these utilities require the
  2733. other user to be logged in and others do not. 
  2734.  
  2735. The mail utility can be used to send messages to one or more
  2736. users.  It is not necessary for the user that is receiving the
  2737. message to be logged in.  The mail utility delivers the message
  2738. to a file belonging to the recipient.  The user will be notified
  2739. that a mail message exists. Messages can be saved or deleted and
  2740. a reply sent.
  2741.  
  2742. The talk utility is an interactive session that allows each user
  2743. to send message simultaneously to each other.  Both users must be
  2744. currently logged in for this utility to work.
  2745.  
  2746. The write utility is a one-way communication.  It allows you to
  2747. send a message to another user. The user must be logged in and no
  2748. reply is possible. 
  2749.  
  2750. 5.1  Sending Electronic Mail
  2751.  
  2752.  
  2753. The basic command line format for sending mail is:
  2754.                              
  2755. ╔═══════════════════════════════════════════════════════════════╗
  2756. ║  Command Format: mailx [options] [user1[usern]]               ║
  2757. ║                                                               ║
  2758. ║    options - see man pages for a complete list                ║
  2759. ║                                                               ║
  2760. ║    user1[usern] - one or more users to get the mail           ║
  2761. ║                   message                                     ║
  2762. ║                                                               ║
  2763. ╚═══════════════════════════════════════════════════════════════╝
  2764.  
  2765. The username is the name assigned by the system administrator to
  2766. a user on the UNIX system (for example, rharding).  The username
  2767. can also include a system name if the recipient is on another
  2768. UNIX system that can communicate with the sender's (for example,
  2769. sys2!rharding).  Let's assume that the recipient is on the local
  2770. UNIX system.
  2771.  
  2772.  
  2773. Sample Session:
  2774.  
  2775. ┌───────────────────────────────────────────────────────────────┐
  2776. │ $mailx rharding(Ret)                                          │
  2777. │ Subject:                                                      │
  2778. └───────────────────────────────────────────────────────────────┘
  2779.  
  2780. Now enter the subject of your message followed by a (Ret).  The
  2781. cursor will appear on the next line.  Simply start typing the
  2782. message.  There is no limit to the length of a message.  When you
  2783. have finished, send it by typing Ctrl-D on a new line.
  2784.  
  2785.  
  2786. Sample Session:
  2787.  
  2788. ┌───────────────────────────────────────────────────────────────┐
  2789. │ $mailx rharding(Ret)                                          │
  2790. │ Subject: Work schedule(Ret)                                   │
  2791. │ Please check the bulletin board(Ret)                          │
  2792. │ for the new work schedule.(Ret)                               │
  2793. │ Ctrl-D                                                        │
  2794. │ $                                                             │
  2795. └───────────────────────────────────────────────────────────────┘
  2796.                                                                  
  2797. The shell prompt on the last line indicates that the message has
  2798. been queued (placed in a waiting line) and will be sent.
  2799. 5.2  Reading Mail
  2800.  
  2801.  
  2802. To read your mail enter:
  2803.  
  2804.  
  2805. Example:
  2806.  
  2807. .................................................................
  2808. . $mailx                                                        .
  2809. .................................................................
  2810.  
  2811. Executing this command places you in the command mode of mailx. 
  2812. If there are no mail messages waiting to be read, you will see
  2813. the following message on the screen:
  2814.  
  2815.  
  2816. Sample Session:
  2817.  
  2818. ┌───────────────────────────────────────────────────────────────┐
  2819. │ $mailx                                                        │
  2820. │ No mail for teacher                                           │
  2821. │ $                                                             │
  2822. └───────────────────────────────────────────────────────────────┘
  2823.  
  2824. Of course, your username will appear instead of 'teacher'.
  2825.  
  2826. When a mail message appears in the recipient's mailbox, the
  2827. following message will appear on the screen. 
  2828.  
  2829.  
  2830. Example:
  2831.  
  2832. .................................................................
  2833. . you have mail                                                 .
  2834. .................................................................
  2835.  
  2836. This notice will appear when you login to the system or upon
  2837. return to the shell from another procedure.
  2838. When you have been notified of mail waiting to be read, enter the
  2839. command to enter mail.  The screen will look something like this:
  2840.  
  2841.  
  2842. Sample Session:
  2843.  
  2844. ┌───────────────────────────────────────────────────────────────┐
  2845. │ $mailx                                                        │
  2846. │                                                               │
  2847. │ mailx version 3.1  Type ? for help.                           │
  2848. │ "/usr/mail/teacher": 3 messages 3 new                         │
  2849. │ >N  1 bhood         Fri Jul 13 13:01   21/324   Review session│
  2850. │  N  2 class2        Fri Jul 13 14:53   15/211   Meeting notice│
  2851. │  N  3 phajny        Fri Jul 13 16:53   11/272   Reorganization│
  2852. │ ?                                                             │
  2853. └───────────────────────────────────────────────────────────────┘
  2854.                                                       
  2855. This first line indicates the version of mailx that is being
  2856. used.  In this case, version 3.1.  There is a reminder that help
  2857. is available by typing the ?.  The second line shows the path
  2858. name of the file used as input (usually the same as the username)
  2859. and a count of the total number of messages and their status. 
  2860. The messages are numbered in sequence with the latest one
  2861. received on the bottom of the list.  To the left of the sequence
  2862. numbers, there may be a status indicator; N for new, U for
  2863. unread.  The > symbol points to the current message.  The other
  2864. fields in the header line show the login of the sender, day,
  2865. date, and time it was delivered.  The next field has the number
  2866. of lines and characters in the message.  The last field is the
  2867. subject of the message; it might be blank.
  2868.  
  2869. To read the mail messages you can do any of the following steps:
  2870.  
  2871.  
  2872. (Ret)                       -      This will cause the current message to
  2873.                                    be displayed.  The current message is
  2874.                                    the once indicated by the > sign.
  2875.  
  2876. p (Ret)                     -      This is equivalent to pressing the (Ret)
  2877.                                    key with no argument.  The current
  2878.                                    message will be displayed.
  2879.  
  2880. p 2 (Ret)                   -      You can press p (for print) or t (for
  2881.                                    type) followed by the message number(s).
  2882.  
  2883. p teacher (Ret)             -      This will print all messages from user
  2884.                                    teacher.
  2885. 5.3  Saving Mail
  2886.  
  2887.  
  2888. All messages that are not specifically deleted are saved when
  2889. quitting mailx.  Messages that have been saved are placed in a
  2890. file in the home directory called mbox.  The mbox file is the
  2891. default.  It is possible to save them in a file of the users
  2892. choice.  Messages that have not been read are held in the
  2893. mailbox.  The command to save messages comes in two forms.  
  2894.  
  2895. ╔═══════════════════════════════════════════════════════════════╗
  2896. ║  Command Format:  S [msglist]                                 ║
  2897. ║                                                               ║
  2898. ║     msglist =                                                 ║
  2899. ║                                                               ║
  2900. ║     n          message number n the current message           ║
  2901. ║                                                               ║
  2902. ║     ^          the first undeleted message                    ║
  2903. ║                                                               ║
  2904. ║     $          the last message                               ║
  2905. ║                                                               ║
  2906. ║     *          all messages                                   ║
  2907. ║                                                               ║
  2908. ║     n-m        an inclusive range of message numbers          ║
  2909. ║                                                               ║
  2910. ║     user       all messages from user                         ║
  2911. ║                                                               ║
  2912. ║     /string    All messages with string in the subject line   ║
  2913. ║                (case is ignored)                              ║
  2914. ║                                                               ║
  2915. ║     :c         all messages of type c where c is:             ║
  2916. ║                                                               ║
  2917. ║                    d - deleted messages                       ║
  2918. ║                    n - new messages                           ║
  2919. ║                    o - old messages                           ║
  2920. ║                    r - read messages                          ║
  2921. ║                    u - unread messages                        ║
  2922. ║                                                               ║
  2923. ╚═══════════════════════════════════════════════════════════════╝
  2924. Messages specified by the msglist argument are saved in a file in
  2925. the current directory named for the author of the first message
  2926. in the list.  If the username 'teacher' sent the message and you
  2927. entered:
  2928.  
  2929.  
  2930. Sample Session:
  2931.  
  2932. ┌───────────────────────────────────────────────────────────────┐
  2933. │ ? S *                                                         │
  2934. │ "teacher" [New file] 11/268                                   │
  2935. │ ?                                                             │
  2936. └───────────────────────────────────────────────────────────────┘
  2937.  
  2938. The mail message has been saved into a file in your current
  2939. directory called 'teacher'.  If you want to save the file in
  2940. another filename, you can do that with the second method of
  2941. saving mail.  Basically, it works the same as S; but it allows
  2942. you to save the mail to a file you specify.
  2943.  
  2944. ╔═══════════════════════════════════════════════════════════════╗
  2945. ║  Command Format:  s  [msglist]  [file1]                       ║
  2946. ║                                                               ║
  2947. ║     msglist - same arguments as before                        ║
  2948. ║                                                               ║
  2949. ║     file1 - filename which will receive the saved mail        ║
  2950. ╚═══════════════════════════════════════════════════════════════╝
  2951. 5.4  Deleting Mail
  2952.  
  2953.  
  2954. To delete a message, enter a d at the command mode prompt
  2955. followed by a msglist argument.  An msglist argument can be any
  2956. one the following:
  2957.  
  2958.  
  2959.  
  2960.        n             message number n the current message
  2961.  
  2962.        ^             the first undeleted message
  2963.  
  2964.        $             the last message
  2965.  
  2966.        *             all messages
  2967.  
  2968.        n-m           an inclusive range of message numbers
  2969.  
  2970.        user          all messages from user
  2971.  
  2972.        /string       All messages with string in the subject line (case
  2973.                      is ignored)
  2974.  
  2975.        :c            all messages of type c where c is:
  2976.  
  2977.                             d - deleted messages
  2978.                             n - new messages
  2979.                             o - old messages
  2980.                             r - read messages
  2981.                             u - unread messages
  2982.  
  2983. For example, suppose you wanted to delete all of your mail
  2984. messages.  Enter the following command at the command mode
  2985. prompt.  The command mode prompt for mailx is the question mark
  2986. (?).
  2987.  
  2988.  
  2989. Sample Session:
  2990.                                                                 
  2991. ┌───────────────────────────────────────────────────────────────────────────┐
  2992. │ $mailx                                                                    │
  2993. │                                                                           │
  2994. │  mailx version 3.1  Type ? for help.                                      │
  2995. │  "/usr/mail/teacher": 3 messages 3 new                                    │
  2996. │  >N  1 bhood              Fri Jul 13 13:01   21/324   Review  session     │
  2997. │   N  2 class2             Fri Jul 13 14:53   15/211   Meeting notice      │
  2998. │   N  3 phajny             Fri Jul 13 16:53   11/272   Reorganization      │
  2999. │ ? d *                                                                     │
  3000. │ ? q                                                                       │
  3001. │ $                                                                         │
  3002. └───────────────────────────────────────────────────────────────────────────┘
  3003.                                                               
  3004.  
  3005. All of the messages have now been deleted.  The messages are not
  3006. actually deleted until the mailbox is exited.  Until that happens
  3007. the u (for undelete) command is available.  Once the quit command
  3008. (q) is entered, however, the deleted messages are gone.
  3009. 5.5  Undeliverable Mail
  3010.  
  3011.  
  3012. If there has been an error in the recipient's username, the mail
  3013. command will not be able to deliver the message.  For example,
  3014. let's say you misspelled the username.  It will return the mail
  3015. in a message that includes the system name and username of the
  3016. sender and recipient.  It also includes a message stating the
  3017. reason for the failure.
  3018.  
  3019. The sender of the message would get a message from mailx
  3020. indicating that an error had occurred.
  3021.  
  3022.  
  3023. Sample Session:
  3024.  
  3025. ┌────────────────────────────────────────────────────────────────────────────┐
  3026. │ $mailx                                                                     │
  3027. │                                                                            │
  3028. │ mailx version 3.1  Type ? for help.                                        │
  3029. │ "/usr/mail/teacher": 1 message 1 new                                       │
  3030. │ >N  1 teacher            Fri Jul 13 13:45   25/655 Returned mail:User unkno│
  3031. │ ?                                                                          │
  3032. │ Message  1:                                                                │
  3033. │ From teacher Fri Jul 13 13:45:57 1990                                      │
  3034. │ Received: by domax1.UUCP (5.51/)                                           │
  3035. │      id AA01997; Fri, 13 Jul 90 13:45:54 mdt                               │
  3036. │ Date: Fri, 13 Jul 90 13:45:54 mdt                                          │
  3037. │ From: Mail Delivery Subsystem <MAILER-DAEMON>                              │
  3038. │ Subject: Returned mail: User unknown                                       │
  3039. │ Message-Id: <9007131945.AA01997@domax1.UUCP>                               │
  3040. │ To: teacher                                                                │
  3041. │ Status: R                                                                  │
  3042. │                                                                            │
  3043. │    ----- Transcript of session follows -----                               │
  3044. │ 550 snoopy... User unknown: No such file or directory                      │
  3045. │                                                                            │
  3046. │    ----- Unsent message follows -----                                      │
  3047. │ Received: by domax1.UUCP (5.51/)                                           │
  3048. │      id AA01995; Fri, 13 Jul 90 13:45:54 mdt                               │
  3049. │ Date: Fri, 13 Jul 90 13:45:54 mdt                                          │
  3050. │ From: Teacher Account D-7130 <teacher>                                     │
  3051. │ Message-Id: <9007131945.AA01995@domax1.UUCP>                               │
  3052. │ To: snoopy                                                                 │
  3053. │ Subject: Meeting notice                                                    │
  3054. │                                                                            │
  3055. │ Meeting will be held at Charlie Brown's house.                             │
  3056. │ July 13, 1990                                                              │
  3057. │ 7:30 p.m.                                                                  │
  3058. │                                                                            │
  3059. │ ?                                                                          │ 
  3060. └────────────────────────────────────────────────────────────────────────────┘
  3061.  
  3062. The ? is the mailx command mode prompt.  Mailx is asking for
  3063. input.  
  3064.  
  3065. A list of commands available can be shown by entering a ?.
  3066.  
  3067.  
  3068. Sample Session:
  3069.  
  3070. ┌────────────────────────────────────────────────────────────────────────────┐
  3071. │ ? ?                                                                        │
  3072. │                         mailx commands                                     │
  3073. │ type [msglist]          print messages                                     │
  3074. │ next                    goto and type next message                         │
  3075. │ edit [msglist]          edit messages                                      │
  3076. │ from [msglist]          give header lines of messages                      │
  3077. │ delete [msglist]        delete messages                                    │
  3078. │ undelete [msglist]      restore deleted messages                           │
  3079. │ save [msglist] file     append messages to file                            │
  3080. │ reply [message]         reply to message, including all recipients         │
  3081. │ Reply [msglist]         reply to the authors of the messages               │
  3082. │ preserve [msglist]      preserve messages in mailbox                       │
  3083. │ mail user               mail to specific user                              │
  3084. │ quit                    quit, preserving unread messages                   │
  3085. │ xit                     quit, preserving all messages                      │
  3086. │ header                  print page of active message headers               │
  3087. │ !                       shell escape                                       │
  3088. │ cd [directory]          chdir to directory or home if none given           │
  3089. │ list                    list all commands (no explanations)                │
  3090. │ top [msglist]           print top 5 lines of messages                      │
  3091. │ z [-]                   display next [last] page of 10 headers             │
  3092. │                                                                            │
  3093. │ [msglist] is optional and specifies messages by number, author,            │
  3094. │ or type.                                                                   │
  3095. │ The default is the current message.                                        │
  3096. │ ?                                                                          │
  3097. └────────────────────────────────────────────────────────────────────────────┘
  3098.  
  3099. This is a partial list of mailx commands available to you.  We
  3100. will not discuss all of them.  If you are interested in the other
  3101. features, you can use the on-line manual pages to find out how to
  3102. use them.
  3103. 5.6  Talk Utility
  3104.  
  3105.  
  3106. Talk is a visual communication program which copies lines from
  3107. one terminal to that of another user.  This is similar to the
  3108. phone utility on VMS.  Once communication is established between
  3109. two users, they can both type simultaneously with their output
  3110. appearing in separate windows.
  3111.  
  3112. ╔════════════════════════════════════════════════════════════════════════════╗
  3113. ║  Command Format:  talk <user1> [ttyname]                                   ║
  3114. ║                                                                            ║
  3115. ║     user1 -     If you are talking to someone on the same machine,         ║
  3116. ║                 then this is just the person's username.  If               ║
  3117. ║                 you want to talk to a user on another host, then           ║
  3118. ║                 user1 is of the form:                                      ║
  3119. ║                                                                            ║
  3120. ║                 host!user     or                                           ║
  3121. ║                 host.user     or                                           ║
  3122. ║                 host:user     or                                           ║
  3123. ║                 user@host                                                  ║
  3124. ║                                                                            ║
  3125. ║                 user@host being preferred                                  ║
  3126. ║                                                                            ║
  3127. ║     ttyname   - If the person you want to talk to is logged on             ║
  3128. ║                 more than once, you can use the ttyname argument           ║
  3129. ║                 to indicate the terminal name.                             ║
  3130. ╚════════════════════════════════════════════════════════════════════════════╝
  3131.  
  3132. For illustration, let's assume we want to talk with the user
  3133. student on the same machine.  The command is:
  3134.  
  3135.  
  3136. Example originator:
  3137.  
  3138. .................................................................
  3139. . $talk student                                                 .
  3140. .................................................................
  3141.  
  3142.  
  3143. Example recipient:
  3144.  
  3145. .................................................................
  3146. . Message from Talk_Daemon@domax1 at 17:36 ...                  .
  3147. . talk: connection requested by teacher@domax1.                 .
  3148. . talk: respond with:  talk teacher@domax1                      .
  3149. .................................................................
  3150. When the recipient has typed in talk teacher@domax1, the
  3151. following message will appear on the originators screen:
  3152.  
  3153.  
  3154. Sample Session originator:
  3155.  
  3156. ┌───────────────────────────────────────────────────────────────┐
  3157. │  Connection established.                                      │
  3158. └───────────────────────────────────────────────────────────────┘
  3159.  
  3160. The screen will be divided in half by a row of dash characters. 
  3161. The originator will type a message on the top half, and the same
  3162. message will appear on the lower half of the screen on the
  3163. recipient's screen.
  3164.  
  3165. Likewise, everything the recipient types on the top of his screen
  3166. the same message will appear on the bottom of the originators
  3167. screen.  Once this communication is established, the parties may
  3168. type simultaneously with their output appearing in different
  3169. windows.  While in talk, Ctrl-L will cause the screen to be
  3170. reprinted, and the erase and kill characters work as you would
  3171. expect.
  3172.  
  3173.  
  3174. Sample Session originator:
  3175.  
  3176. ┌───────────────────────────────────────────────────────────────┐
  3177. │  Hi Snoopy,                                                   │
  3178. │  Charlie Brown suggests we meet at noon today.                │
  3179. │                                                               │
  3180. │                                                               │
  3181. │                                                               │
  3182. │                                                               │
  3183. │                                                               │
  3184. │                                                               │
  3185. │-------------------------------------------------------------- │
  3186. │  OK, but the billiard championship is in my house at 1 P.M.   │
  3187. │                                                               │
  3188. │                                                               │
  3189. │                                                               │
  3190. │                                                               │
  3191. │                                                               │
  3192. │                                                               │
  3193. └───────────────────────────────────────────────────────────────┘
  3194. Sample session recipient:
  3195.  
  3196. ┌───────────────────────────────────────────────────────────────┐
  3197. │  OK, but the billiard championship is in my house at 1 P.M.   │
  3198. │                                                               │
  3199. │                                                               │
  3200. │                                                               │
  3201. │                                                               │
  3202. │                                                               │
  3203. │                                                               │
  3204. │                                                               │
  3205. │-------------------------------------------------------------- │
  3206. │  Hi Snoopy,                                                   │
  3207. │  Charlie Brown suggests we meet at noon today.                │
  3208. │                                                               │
  3209. │                                                               │
  3210. │                                                               │
  3211. │                                                               │
  3212. │                                                               │
  3213. └───────────────────────────────────────────────────────────────┘
  3214.  
  3215. When the communication is finished, the interrupt character will
  3216. cause the talk utility to exit.
  3217.  
  3218.  
  3219. Example:
  3220.  
  3221. .................................................................
  3222. .     [Connection closing. Exiting]                             .
  3223. .................................................................
  3224. 5.7  Talk Permission Denied
  3225.  
  3226.      
  3227. If you don't wish to have your work interrupted by a request to
  3228. establish a talk connection, you can deny messages.
  3229.  
  3230. ╔═══════════════════════════════════════════════════════════════╗
  3231. ║  Command Format:  mesg  [-[n][y]]                             ║ 
  3232. ║                                                               ║
  3233. ║    n -  no, forbids messages via write by revoking non-user   ║
  3234. ║         write permission on the user's terminal.              ║
  3235. ║                                                               ║
  3236. ║    y -  yes, reinstates permission                            ║
  3237. ║                                                               ║
  3238. ║                                                               ║
  3239. ║     mesg with no arguments will report the current state      ║
  3240. ║     without changing it.                                      ║
  3241. ╚═══════════════════════════════════════════════════════════════╝
  3242.  
  3243.  
  3244. Sample Session:
  3245.  
  3246. ┌───────────────────────────────────────────────────────────────┐
  3247. │ $mesg                                                         │
  3248. │ is y                                                          │
  3249. │ $mesg -n                                                      │
  3250. │ $mesg                                                         │
  3251. │ is n                                                          │
  3252. │ $mesg -y                                                      │
  3253. │ $mesg                                                         │
  3254. │ is y                                                          │
  3255. │ $                                                             │
  3256. └───────────────────────────────────────────────────────────────┘
  3257.  
  3258. The default permission is enabled.  Some UNIX commands, however,
  3259. disallow messages in order to prevent messy output.
  3260. 5.8  Write Utility
  3261.  
  3262.  
  3263. This command will write a message to the screen of another user. 
  3264.  
  3265. ╔═══════════════════════════════════════════════════════════════╗
  3266. ║  Command Format:  write <user1> [ttyname]                     ║
  3267. ║                                                               ║
  3268. ║   user1  - username of the user                               ║
  3269. ║                                                               ║
  3270. ║   ttyname - which terminal to send (i.e. tty00)               ║
  3271. ╚═══════════════════════════════════════════════════════════════╝
  3272.  
  3273.  
  3274. Sample Session originator:
  3275.  
  3276. ┌───────────────────────────────────────────────────────────────┐
  3277. │ $write lucy                                                   │
  3278. │ Hello Lucy,                                                   │
  3279. │ What's the latest from the Psychology Department?             │
  3280. │ (interrupt character)                                         │
  3281. │ $                                                             │
  3282. └───────────────────────────────────────────────────────────────┘
  3283.  
  3284.  
  3285. Sample Session recipient:
  3286.                                                                               
  3287. ┌────────────────────────────────────────────────────────────────────────────┐
  3288. │ $                                                                          │
  3289. │                                                                            │
  3290. │ Message from teacher on domax1 (rt021d0) [ Thu Jul 19 13:43:12 ] ..        │
  3291. │ Hello Lucy,                                                                │
  3292. │ What's the latest from the Psychology Department?                          │
  3293. │ <EOT>                                                                      │
  3294. │                                                                            │
  3295. │ $                                                                          │
  3296. └────────────────────────────────────────────────────────────────────────────┘
  3297.  
  3298. Here's a suggestion for using write to communicate a little
  3299. easier.
  3300.  
  3301. When the user first 'writes' to another user, wait for the
  3302. recipient to 'write' back before starting to send.  Both users
  3303. should agree on a signal to indicate to the other person that
  3304. they can reply.  How about 'o' for over.  The signal 'oo' could
  3305. be used for "over and out," which would mean that the
  3306. communication is finished.
  3307.                                             NOTES
  3308. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3309. Workshop 5
  3310.  
  3311.  
  3312. This workshop will reinforce your understanding of the topics
  3313. covered in this chapter.  Login to the Multimax with the username
  3314. and password given to you by the instructor.  Each student is to
  3315. complete the entire workshop.  Computer exercises might need to
  3316. be worked as a team.
  3317.  
  3318. DESK EXERCISES
  3319.  
  3320.  
  3321. 1.     What is the command to send an electronic mail message to
  3322.        another user on the Multimax?
  3323.  
  3324.  
  3325.  
  3326.  
  3327. 2.     Once you have entered the mail utility what command can you
  3328.        enter to get help?
  3329.  
  3330.  
  3331.  
  3332.  
  3333. 3.     What does the command d 5-9 accomplish?
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339. 4.     What is the command to exit the mail utility and return to
  3340.        the UNIX system prompt?
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346. 5.     What is the mailx command mode prompt?
  3347.  
  3348.  
  3349.  
  3350.  
  3351. 6.     How would you create a "talk" session to user Student2 on
  3352.        the host domax0?
  3353.  
  3354.  
  3355.  
  3356.  
  3357. 7.     What time does the billiard championship start?
  3358.  
  3359.  
  3360.                                   Continue on the next page
  3361.  
  3362. 8.     What UNIX command will prevent interruption of your work by
  3363.        someone wishing to "talk"?
  3364.  
  3365.  
  3366.  
  3367.  
  3368. 9.     Regarding "write", does the recipient need to be logged in?
  3369.  
  3370.  
  3371.  
  3372.  
  3373.  
  3374.        Regarding "talk", does the recipient need to be logged in?
  3375.  
  3376.  
  3377.  
  3378.  
  3379.  
  3380.  
  3381.  
  3382.  
  3383.  
  3384.  
  3385.  
  3386.  
  3387.  
  3388.  
  3389.  
  3390.  
  3391.  
  3392.  
  3393.  
  3394.  
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.                                   Continue on the next page
  3414. COMPUTER EXERCISES
  3415.  
  3416.  
  3417. 10.    Login to the Multimax.
  3418.  
  3419.  
  3420.  
  3421.  
  3422. 11.    Send a mail message to another student in the class.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.        How can you find out who is logged in?  (who?)
  3428.  
  3429.  
  3430.  
  3431.  
  3432.        Does the recipient need to be logged in?
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439. 12.    Send a mail message to username lucy. (lucy does not exist) 
  3440.  
  3441.        What happened?  Why?
  3442.  
  3443.  
  3444.  
  3445.  
  3446.  
  3447.  
  3448. 13.    Read your mail and save one message to the current working
  3449.        directory. 
  3450.  
  3451.  
  3452.        Delete all other mail messages.
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.                                   Continue on the next page
  3466. 14.    Establish a talk connection with another student.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472. 15.    What UNIX command do you enter to deny permission for a talk
  3473.        connection?  Try it!
  3474.  
  3475.  
  3476.  
  3477.  
  3478. 16.    Send a message to another student using the write command.
  3479.  
  3480.        How is this different from "talk?" 
  3481.  
  3482.  
  3483.  
  3484.  
  3485.  
  3486. 17.    Logout of the Multimax and the Annex.
  3487.  
  3488.  
  3489. 6.  SHELL BASICS
  3490.  
  3491.  
  3492. There have been several shells written for UNIX.  They have
  3493. different features and each is in use through out the world.  The
  3494. BourneShell is the accepted standard for System V UNIX.  Another
  3495. shell is called the Cshell, named for "C" which is the high-level
  3496. programming language.  Another shell is the KornShell; it is
  3497. named after the person who developed it, David Korn.  It has more
  3498. features than the BourneShell and is of special interest to
  3499. programmers.
  3500.  
  3501. The purpose of this chapter is to give you some idea as to the
  3502. functions available through the shells and their general
  3503. function.  Details of shell programming are discussed in another
  3504. class, "UNIX Bourne Shell Programming".
  3505.  
  3506. UMAX makes full use of the ASCII character set.  Unlike operating
  3507. system command languages like VMS or NOS, UNIX is case sensitive. 
  3508. In addition, several characters have special meanings to the
  3509. shell.  We have already seen that a slash (/) by itself indicates
  3510. the root directory and is used with directory, subdirectory, and
  3511. filenames to indicate an absolute or relative pathname.
  3512.  
  3513. Other special characters that have meaning to the shell include:
  3514.  
  3515.               `    '    $    {    }    ||    &&    ;
  3516.  
  3517. Input to a command is usually taken from your keyboard, and the
  3518. output of a command is normally displayed on your monitor screen. 
  3519. Keyboard input is referred to as "standard input" or "stdin," and
  3520. screen output as "standard output" or "stdout."
  3521. 6.1  Input Redirection
  3522.  
  3523.  
  3524. It is possible to instruct UNIX to get data from a file rather
  3525. than from the keyboard.  This is called input redirection.  To
  3526. indicate that input to a command is to come from a file rather
  3527. than the keyboard, use the input redirection character (<).
  3528.  
  3529. ╔═══════════════════════════════════════════════════════════════╗
  3530. ║  Command Format:  command < input-file1                       ║
  3531. ║                                                               ║
  3532. ║    command   - a command                                      ║
  3533. ║                                                               ║
  3534. ║  input-file1 - input file that supplies input                 ║
  3535. ║                to the command                                 ║
  3536. ╚═══════════════════════════════════════════════════════════════╝
  3537.  
  3538. A Memory Trick:             The less-than symbol looks like a funnel.  If
  3539.                             you pour liquid into the wide end, it flows
  3540.                             to the narrow end.  The input-file "pours"
  3541.                             its contents into the command.
  3542.  
  3543.  
  3544. Sample Session:
  3545.                                                                  
  3546. ┌───────────────────────────────────────────────────────────────┐
  3547. │ $mailx phajny < report                                        │
  3548. │ $                                                             │
  3549. └───────────────────────────────────────────────────────────────┘
  3550.  
  3551. The file named report will be sent to the login name phajny. 
  3552. Mail normally expects the input to come from standard input, the
  3553. keyboard.  The input redirection symbol causes the input to mail
  3554. to come from the file called report.
  3555. 6.2  Output Redirection
  3556.  
  3557. It is also possible to instruct UNIX to send data to a file
  3558. rather than sending it to the default monitor screen.  This is
  3559. called output redirection.  To indicate that the output from a
  3560. command is to go into a file rather than be displayed on the
  3561. monitor screen, use the output redirection character >.
  3562.                    
  3563. ╔═══════════════════════════════════════════════════════════════╗
  3564. ║  Command Format:  command > output-file1                      ║ 
  3565. ║                                                               ║
  3566. ║      command    - a command                                   ║
  3567. ║                                                               ║
  3568. ║    output-file1 - output file that will receive the output    ║
  3569. ║                   from the command                            ║ 
  3570. ╚═══════════════════════════════════════════════════════════════╝
  3571.                                                                  
  3572.  
  3573. The memory trick still works; only now the funnel points toward
  3574. the file that will receive the output.
  3575.  
  3576. Sample Session:
  3577.  
  3578. ┌───────────────────────────────────────────────────────────────┐
  3579. │ $ls -l > listing                                              │
  3580. │ $                                                             │
  3581. └───────────────────────────────────────────────────────────────┘
  3582.  
  3583. The output of the ls command will not be displayed on the screen,
  3584. instead it will be in the file named listing.  If the file does
  3585. not exist, the shell will create it.  If it already exists, it
  3586. will be overwritten.
  3587.  
  3588. WARNING:      The shell will NOT issue a warning about overwriting
  3589.               the original file.
  3590.  
  3591. It is possible to use the cat command to create a file and input
  3592. text into that file using output redirection.  The following
  3593. example shows how this can be done.
  3594.  
  3595. Sample session:
  3596.  
  3597. ┌───────────────────────────────────────────────────────────────┐
  3598. │    $cat > file1                                               │
  3599. │      This is a line of text.                                    │
  3600. │    This is another line of text.                              │
  3601. │    (Ctrl-D)                                                   │
  3602. │    $cat file1                                                 │
  3603. │    This is a line of text.                                    │
  3604. │    This is another line of text.                              │
  3605. │    $                                                          │
  3606. └───────────────────────────────────────────────────────────────┘
  3607. 6.3  Output Redirection with Append 
  3608.  
  3609.  
  3610. The following shell command will also redirect the output to a
  3611. file but instead of overwriting the existing file, it will append
  3612. the output to the end of output-file.
  3613.  
  3614. ╔═══════════════════════════════════════════════════════════════╗
  3615. ║  Command Format:  command >> output-file1                     ║
  3616. ║                                                               ║
  3617. ║    command      - a command                                   ║
  3618. ║                                                               ║
  3619. ║    output-file1 - receives the output from command            ║
  3620. ╚═══════════════════════════════════════════════════════════════╝
  3621.  
  3622. Believe it or not, the memory trick still works; only in this
  3623. case, one funnel feeds onto another.  So the output is fed onto
  3624. the end of output-file.  Okay, it's a little far fetched; but it
  3625. can help you remember.  Try it.
  3626.  
  3627.  
  3628. Sample Session:
  3629.  
  3630. ┌───────────────────────────────────────────────────────────────┐
  3631. │ $ls -l subdir >> listing                                      │
  3632. │ $                                                             │
  3633. └───────────────────────────────────────────────────────────────┘
  3634.                                                                  
  3635. This will append the output of the ls command to the file listing
  3636. without destroying any existing data.  If the file does not
  3637. exist, the shell will create it.
  3638.  
  3639. Again, it's possible to append text to the end of an existing
  3640. file using the cat command.  Note the following example.
  3641.  
  3642.  
  3643. ┌───────────────────────────────────────────────────────────────┐
  3644. │    $cat >> file1                                              │
  3645. │      This is a third line of text.                              │
  3646. │    This is a fourth line of text.                             │
  3647. │    (Ctrl-D)                                                   │
  3648. │    $cat file1                                                 │
  3649. │    This is a line of text.                                    │
  3650. │    This is another line of text.                              │
  3651. │    This is a third line of text.                              │
  3652. │    This is a fourth line of text.                             │
  3653. │    $                                                          │
  3654. └───────────────────────────────────────────────────────────────┘
  3655.  
  3656. If the file does not exist it will be created and the text added.
  3657.  
  3658.  
  3659. 6.4  Input and Output Redirection
  3660.  
  3661.  
  3662. Input and output redirection can occur on the same command line.
  3663.  
  3664. ╔═══════════════════════════════════════════════════════════════╗
  3665. ║  Command Format:  command  < input-file1 >  output-file1      ║
  3666. ║                                                               ║
  3667. ║    command       - A command                                  ║
  3668. ║    input-file1   - supplies input to command                  ║ 
  3669. ║    output-file1  - receives the output from command           ║
  3670. ╚═══════════════════════════════════════════════════════════════╝
  3671.  
  3672.  
  3673. Sample Session:
  3674.  
  3675. ┌───────────────────────────────────────────────────────────────────────────────┐
  3676. │ $cat command_file                                                             │
  3677. │ p                                                                             │
  3678. │ $mailx < command_file > result_file                                           │
  3679. │                                                                               │
  3680. │ $cat result_file                                                              │
  3681. │ mailx version 3.1  Type ? for help.                                           │
  3682. │ "/usr/mail/teacher": 1 message 1 new                                          │
  3683. │ >N  1 teacher            Mon Dec 31 10:16   57/3171                           │
  3684. │ Message  1:                                                                   │
  3685. │ From teacher Mon Dec 31 10:16:30 1990                                         │
  3686. │ Received: by domax1.UUCP (5.51/)                                              │
  3687. │         id AA18976; Mon, 31 Dec 90 10:16:28 mst                               │
  3688. │ Date: Mon, 31 Dec 90 10:16:28 mst                                             │
  3689. │ From: Teacher Account D-7130 <teacher>                                        │
  3690. │ Message-Id: <9012311716.AA18976@domax1.UUCP>                                  │
  3691. │ To: teacher                                                                   │
  3692. │ Status: R                                                                     │
  3693. │                                                                               │
  3694. │ What's Happening                                                              │
  3695. │ by Pam Hajny                                                                  │
  3696. │ Denver Office                                                                 │
  3697. │                                                                               │
  3698. │ With IRM Training:                                                            │
  3699. │                                                                               │
  3700. │ A Reclamation-wide workshop was held in early October to discuss information  │
  3701. │ resources management training.  Trainers from each region and the Denver Offic│
  3702. │ shared training techniques, ideas and course materials.  We met one afternoon │
  3703. │ with the personnel training officers to discuss broad IRM training needs and  │
  3704. .                                                                               .
  3705. .                                                                               .
  3706. .                                                                               .
  3707.  
  3708. 6.5  Pipes
  3709.  
  3710.  
  3711. The output of a command can be used as the input to a second
  3712. command by using the "pipe" symbol (|) without using any
  3713. temporary files.  On some terminals the pipe symbol is a vertical
  3714. bar and on others it is a broken vertical bar.  Both will work
  3715. exactly the same.  The following command format shows how to use
  3716. the pipe symbol:
  3717.  
  3718. ╔═══════════════════════════════════════════════════════════════╗
  3719. ║  Command Format:  command1 | command2                         ║
  3720. ║                                                               ║
  3721. ║    command1  - a command                                      ║
  3722. ║                                                               ║
  3723. ║    command2  - a second command                               ║
  3724. ╚═══════════════════════════════════════════════════════════════╝
  3725.  
  3726. Example:
  3727.                                                                  
  3728. .................................................................
  3729. . $man acct | pg                                                .
  3730. .................................................................
  3731.  
  3732. The output from the command man are processed by the pg command
  3733. before appearing on your screen.  Normally the output from the
  3734. man command will appear on the monitor line after line until the
  3735. end is reached.  In this case, the output is "piped" to the pg
  3736. command; and the screen will stop scrolling after 23 lines so you
  3737. can read them.
  3738. 6.6  Wildcards
  3739.  
  3740.  
  3741. Wildcards are special characters that cause the shell to search
  3742. over a range of possible values.
  3743.  
  3744.  ? represents any one character, while 
  3745.  
  3746.  * stands for any number of characters including none.
  3747.  
  3748. Example:
  3749.                                            jo?eph
  3750.  
  3751. This indicates that the third letter of the string "jo eph" could
  3752. be any single character. Any character could be substituted for
  3753. the ? character, including numeric and special characters.
  3754.  
  3755. To limit the range of possible values, enclose the possibilities
  3756. in brackets [ ].
  3757.  
  3758. Example:
  3759.                                          jo[a-z]eph
  3760.  
  3761. This example limits the range of characters to the set lowercase
  3762. a through lowercase z.  Uppercase characters, numeric, or special
  3763. characters would not make a match.  Notice that only one charater
  3764. will make a match.
  3765.  
  3766. Using a comma as a separator between choices we can further
  3767. restrict the range. 
  3768.  
  3769. Example:
  3770.                                         jo[s,m,5]eph
  3771.  
  3772. The only set of characters that will make a match are lowercase
  3773. s, lowercase m, and the number 5.  No other character will make a
  3774. match.
  3775.  
  3776.  
  3777. The string  jos*  causes the shell to look for every string that
  3778. begins with the letters "jos," regardless of their length while
  3779. [i-k]*h  finds every string that begins with "i", "j", or "k" and
  3780. ends with an "h".
  3781.  
  3782.  
  3783.  
  3784.  
  3785.  
  3786.  
  3787.  
  3788.  
  3789.  
  3790. Wildcards are extremely useful in wide variety of applications. 
  3791. For example, if you want to use the man pages, but do not know
  3792. the exact command names on the subject of system accounting, try
  3793.  
  3794. Sample Session:
  3795.  
  3796. .................................................................
  3797. .   $man acc*                                                   .
  3798. .................................................................
  3799.  
  3800. All of the commands that begin with the letters acc followed by
  3801. any string (including none) will be passed to the man command as
  3802. arguments.
  3803.  
  3804.  
  3805. If you wanted to get a listing of all the files in your current
  3806. working directory that ended in .c (these are the C source code
  3807. programs). You could enter the following command:
  3808.  
  3809. Sample Session:
  3810.  
  3811. .................................................................
  3812. .    $ls *.c                                                    .
  3813. .................................................................
  3814. In order for the shell to stop interpretation of a special
  3815. character (i.e., use it as a normal character), it must be
  3816. preceded by a backslash (\) or enclosed in single quotes.
  3817.  
  3818. Example:
  3819.                                            jo\?eph
  3820.                                              or
  3821.                                           'jo?eph'
  3822.  
  3823. Both of these examples represent the string jo?eph.  The shell
  3824. will not interpret the question mark character as a wildcard
  3825. metacharacter.
  3826.  
  3827.  
  3828. 6.7  Reestablishing a Background Job
  3829.  
  3830.  
  3831. Processes in UNIX can run in the foreground or the background.
  3832. Foreground processes are interactive; the input is read from the
  3833. keyboard or standard in, and the out goes to the monitor screen
  3834. or standard out.  Background jobs run with no interaction with an
  3835. interactive terminal.  Your current interactive process can be
  3836. suspended by typing the break character at the shell prompt.
  3837.  
  3838.  
  3839. Sample Session:
  3840.  
  3841. ┌───────────────────────────────────────────────────────────────┐
  3842. │ $ <break>                                                     │
  3843. │ annex:                                                        │
  3844. └───────────────────────────────────────────────────────────────┘
  3845.  
  3846.  
  3847. The jobs command displays information on all current jobs
  3848. (sessions).  The most recent job is marked with a plus sign (+),
  3849. and the next previous is marked with a dash or minus sign (-).  A
  3850. job begins when you execute a command to connect to a host (or
  3851. another Annex).  A job ends when you logout from the host or
  3852. terminate the job at the Annex with the kill or hangup command.
  3853.  
  3854. The number of possible jobs allowed per user is determined by the
  3855. network administrator.  The number of jobs can range from 1 to 16
  3856. with a default of 3.
  3857. The Annex command to display the information about the current
  3858. job(s) is:
  3859.  
  3860. ╔═══════════════════════════════════════════════════════════════╗
  3861. ║  Command Format:  jobs                                        ║
  3862. ╚═══════════════════════════════════════════════════════════════╝
  3863.  
  3864.  
  3865. If there are no jobs, the annex: prompt will be displayed.  If
  3866. there are some 'suspended' jobs the following will appear:
  3867.  
  3868.  
  3869. Sample Session:
  3870.  
  3871. ┌───────────────────────────────────────────────────────────────┐
  3872. │ annex: jobs                                                   │
  3873. │ +1      rlogin domax1                                         │
  3874. │ -2      rlogin domax1                                         │
  3875. │ annex:                                                        │
  3876. └───────────────────────────────────────────────────────────────┘
  3877.  
  3878.  
  3879. This shows that there are two jobs in suspension.  Both of these
  3880. sessions did a remote login to domax1.  This is just for
  3881. illustration.
  3882. The fg (foreground) command returns to a suspended job.  The
  3883. command displays the job number and the Annex command that
  3884. created it.  When no arguments are provided, fg will return to
  3885. the most recent job.  With a numeric argument, fg returns the
  3886. specified job.
  3887.  
  3888. To connect with a suspended job (session) enter the following
  3889. Annex command:
  3890.  
  3891. ╔═══════════════════════════════════════════════════════════════╗
  3892. ║  Command Format:  fg [n]                                      ║
  3893. ║                                                               ║
  3894. ║     (none) -   most recent job (+) to foreground              ║
  3895. ║       n    -   job "n" to foreground                          ║ 
  3896. ╚═══════════════════════════════════════════════════════════════╝
  3897.                                                                 
  3898.                                                            
  3899. Sample Session:
  3900.  
  3901. ┌───────────────────────────────────────────────────────────────┐
  3902. │ annex: jobs                                                   │
  3903. │ +1      rlogin domax1                                         │
  3904. │ -2      rlogin domax1                                         │
  3905. │ annex:fg 1                                                    │
  3906. │ 1       rlogin domax1                                         │
  3907. │ (Ret)                                                         │
  3908. │ $                                                             │
  3909. └───────────────────────────────────────────────────────────────┘
  3910.                                             NOTES
  3911. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  3912. Workshop 6
  3913.  
  3914. This workshop will reinforce your understanding of the topics
  3915. covered in this chapter.  Login to the Multimax with the username
  3916. and password given to you by the instructor.  Each student is to
  3917. complete the entire workshop.  Computer exercises might need to
  3918. be worked as a team.
  3919.  
  3920. DESK EXERCISES
  3921.  
  3922.  
  3923. 1.     What is the meaning of the term "case sensitive?"
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929. 2.     What is a wildcard?
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935. 3.     How does the shell interpret the following wildcards?
  3936.  
  3937.        a.     ?
  3938.  
  3939.        b.     [0-9]
  3940.  
  3941.        c.     *
  3942.  
  3943.  
  3944.  
  3945. 4.     How does the shell interpret the following strings?
  3946.  
  3947.        a.     M[i,r]*
  3948.  
  3949.  
  3950.        b.     b?ll
  3951.  
  3952.  
  3953.        c.     me??[1,2]
  3954.  
  3955.  
  3956.        d.     '*special*'
  3957.  
  3958.  
  3959.        e.     anyone\?
  3960.  
  3961.  
  3962.  
  3963.                                   Continue on the next page
  3964. 5.     What is "standard input?"
  3965.  
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971. 6.     What symbol causes a command to take its input from a file? 
  3972.  
  3973.  
  3974.  
  3975.  
  3976.  
  3977.  
  3978. 7.     What is "standard output?"
  3979.  
  3980.  
  3981.  
  3982.  
  3983.  
  3984. 8.     What symbol causes the output of a command to be redirected
  3985.        to a file?
  3986.  
  3987.  
  3988.  
  3989.  
  3990.  
  3991.  
  3992. 9.     What symbol causes the output of a command to be redirected
  3993.        to the input of another command?
  3994.  
  3995.  
  3996.  
  3997.  
  3998.  
  3999.  
  4000. 10.    What symbol is used to indicate input is to be from a file
  4001.        instead of the keyboard?
  4002.  
  4003.  
  4004.  
  4005.  
  4006.  
  4007.  
  4008. 11.    How can the output from a command be saved in an ordinary
  4009.        file?
  4010.  
  4011.  
  4012.  
  4013.  
  4014.  
  4015.                                   Continue on the next page
  4016. 12.    What is a pipe?  No, it's not something you smoke.
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022. COMPUTER EXERCISES
  4023.  
  4024.  
  4025. 13.    Login to the Multimax
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031. 14.    How many different on-line manual entries are displayed by
  4032.        executing the command man ca*?
  4033.  
  4034.  
  4035.  
  4036.  
  4037.  
  4038.  
  4039. 15.    Execute  man ls | pg.  What is the purpose of the |
  4040.        character?
  4041.  
  4042.  
  4043.  
  4044.  
  4045. 16.    Save the on-line manual pages on the cat command in a file
  4046.        called mp0. (hint: output redirection)
  4047.  
  4048.  
  4049.  
  4050.  
  4051.  
  4052. 17.    Save the on-line manual pages on the assist command in a
  4053.        file called mp1. (no hint this time)
  4054.  
  4055.  
  4056.  
  4057.  
  4058.  
  4059. 18.    Type cp mp0 man
  4060.  
  4061.        Does file mp0 still exist after this command is executed? 
  4062.  
  4063.        Why?
  4064.  
  4065.  
  4066.  
  4067.                                   Continue on the next page
  4068. 19.    Type mv mp1 assist
  4069.  
  4070.        Does file mp1 still exist after this command is executed?
  4071.  
  4072.        Why?
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078. 20.    Type cp mp3 man
  4079.  
  4080.        What error message do you get?
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086. 21.    Logout of the Multimax and the Annex.
  4087. 7.  UMAX FILE TRANSFER PROTOCOL (FTP)
  4088.  
  4089.  
  4090. File Transfer Protocol (FTP) is a utility which can transfer
  4091. files to and from TCP/IP networked computers.  TCP/IP stands for
  4092. Transmission Control Protocol/Internet Protocol and consists of a
  4093. suite of defacto standard protocols for networking computers. 
  4094. FTP is one protocol in that suite.  (Other significant protocols
  4095. within TCP/IP are TELNET, Simple Mail Transfer Protocol (SMTP),
  4096. and Network File Systems (NFS).)  The Client portion of UNIX FTP
  4097. lets users on the Multimax access file systems on a remote
  4098. computer.  The Server portion of UNIX FTP lets users on remote
  4099. computers access Multimax files.  For Reclamation, these remote
  4100. computers would be VAXes, CYBERs, IBMs, and Sun workstations.
  4101.  
  4102. Using FTP, you can access directories and files on a remote
  4103. computer and perform common operations, such as list and change
  4104. working directories, transfer files, create directories, delete
  4105. working directories, delete files and directories, and rename
  4106. files and directories.  Once you have entered the FTP utility,
  4107. you make a connection to the desired remote computer and then
  4108. work with the remote computer's files using FTP commands.  The
  4109. connection to the remote computer's FTP remains in effect until
  4110. terminated by the user.  Multimax FTP supports both local help
  4111. for FTP commands and remote help, which displays FTP elements
  4112. available on the remote computer.
  4113.  
  4114. Throughout this chapter, the term "local computer" will refer to
  4115. the Multimax.  The term "remote computer" will refer to the CYBER
  4116. mainframe or the VAX minicomputer.  Please be aware that these
  4117. procedures will work for any computer connected to the Ethernet
  4118. that has an FTP server installed.  The messages that appear may
  4119. be different, but the process will be the same.
  4120. 7.1  Initializing FTP on UMAX
  4121.  
  4122.  
  4123. FTP can be invoked on the Multimax using the following syntax:  
  4124.  
  4125. ╔═══════════════════════════════════════════════════════════════╗
  4126. ║                                                               ║
  4127. ║      Command Format:      ftp [options] [host]                ║
  4128. ║                                                               ║
  4129. ║           options - see man pages for a complete list           ║ 
  4130. ║                                                               ║
  4131. ║          host   - the name of the remote computer             ║
  4132. ║                                                               ║
  4133. ╚═══════════════════════════════════════════════════════════════╝
  4134.        
  4135. NOTE:         UNIX is case sensitive.  The commands and options must
  4136.               be entered as shown.  
  4137. 7.2  Establishing Connection with the Remote Computer
  4138.  
  4139.  
  4140. There are two ways to make a connection with the remote computer. 
  4141.  
  4142. 7.2.1  Calling FTP with no hostname
  4143.  
  4144. The first way is to invoke FTP using no options, simply enter the
  4145. ftp command at the shell prompt.  UMAX will respond with the ftp
  4146. prompt: ftp>
  4147.  
  4148.  
  4149. Sample Session:
  4150.  
  4151. ┌───────────────────────────────────────────────────────────────┐
  4152. │ $ftp                                                          │
  4153. │ ftp>                                                          │
  4154. └───────────────────────────────────────────────────────────────┘
  4155.  
  4156. FTP commands can now be entered.  The utility has its own set of
  4157. commands, and we will discuss about 12 of them in this chapter. 
  4158. A complete list of the FTP commands can be obtained by entering
  4159. help at the FTP prompt.
  4160.  
  4161. The command to establish a connection with remote computer is:
  4162.  
  4163. ╔═══════════════════════════════════════════════════════════════╗
  4164. ║                                                               ║
  4165. ║     Command Format: open <host> [port]                        ║
  4166. ║                                                               ║
  4167. ║     host - hostname, this host must have an FTP server.       ║
  4168. ║                                                               ║
  4169. ║     port - port number (optional)                             ║
  4170. ║                                                               ║
  4171. ╚═══════════════════════════════════════════════════════════════╝
  4172.  
  4173. This command will establish a connection to the remote computer's
  4174. FTP server.  The hostname for the VAX is ERC830. The following
  4175. FTP command will establish a connection with the VAX (ERC830):
  4176.  
  4177.  
  4178. VAX Sample Session:
  4179.  
  4180. ┌───────────────────────────────────────────────────────────────┐
  4181. │ ftp>open erc830                                               │
  4182. │ Connected to erc830.                                          │
  4183. │ 220 erc830 Wollongong FTP Server (Version 5.0) at Mon Dec 4   │
  4184. │ Name (ERC830:rharding):                                       │
  4185. └───────────────────────────────────────────────────────────────┘
  4186. The cursor will stop after the colon.  FTP is waiting for you to
  4187. enter the login name to use when signing on to the remote
  4188. computer.  FTP tries to help you out by giving you a default
  4189. login name.  In the above example, the default login name is
  4190. rharding.  To select the default name, press (Ret).  You can
  4191. enter any login name you want and then press (Ret).  After you
  4192. have selected the login name, either by choosing the default or
  4193. entering a new name, you will be asked for the password.
  4194.  
  4195.  
  4196. VAX Sample Session:
  4197.  
  4198. ┌───────────────────────────────────────────────────────────────┐
  4199. │ 331 Password required for rharding.                           │
  4200. │ Password:                                                     │
  4201. │ 230 User logged in, default directory D_1131:[RHARDING]       │
  4202. └───────────────────────────────────────────────────────────────┘
  4203.  
  4204. Enter the password required for the login name that you
  4205. specified.  Echoing is disabled and the password you enter will
  4206. not be displayed on the screen.  If you entered the correct
  4207. password, message number 230 will show you are logged in and the
  4208. default directory on the remote system.  You are now logged into
  4209. the remote computer system and can proceed to transfer files. 
  4210.  
  4211.  
  4212. CYBER Sample Session:
  4213.  
  4214. ┌───────────────────────────────────────────────────────────────┐
  4215. │ $ftp                                                          │
  4216. │ ftp>open cy2                                                  │
  4217. │ Connected to cy2.                                             │
  4218. │ 220 SERVICE READY FOR NEW USER.                               │
  4219. │ Name (cy2:rharding): class8                                   │
  4220. │ 331 USER NAME OKAY, NEED PASSWORD.                            │
  4221. │ Password: secret                                              │
  4222. │ 230 USER LOGGED IN, PROCEED.                                  │
  4223. │ ftp>                                                          │
  4224. └───────────────────────────────────────────────────────────────┘
  4225.                                                                  
  4226. This example for the CYBER is similar to the VAX example. Notice
  4227. that there a few differences. The login name was changed from
  4228. rharding and the username class8 was entered instead.
  4229. 7.2.2 Calling FTP with a hostname
  4230.  
  4231.  
  4232. The second method of signing on to the remote computer is to
  4233. specify the name of the remote computer on the call to ftp.
  4234.  
  4235.  
  4236. VAX Sample Session:
  4237.  
  4238. ┌───────────────────────────────────────────────────────────────┐
  4239. │ $ftp erc830                                                   │
  4240. │ 220 erc830 Wollongong FTP Server (Version 5.0) at Fri Dec     │
  4241. │ Name (ERC830:rharding):                                       │
  4242. └───────────────────────────────────────────────────────────────┘
  4243. You can now enter the username for the remote system, and you
  4244. will then be prompted for the password.  The effect of specifying
  4245. the hostname on the ftp command line is to do an "automatic" open
  4246. command.
  4247.  
  4248. NOTE:         The messages are slightly different from the VAX login.
  4249.               The login for the CYBER works in a similar manner.
  4250. 7.3  Local Computer Commands
  4251.  
  4252.  
  4253. From the FTP prompt, you can issue commands to the local computer
  4254. to display files or show the contents of a directory.  The
  4255. commands you enter are FTP commands; and although they might
  4256. resemble UNIX commands, they are NOT UNIX commands.
  4257.  
  4258. The FTP command to transfer file(s) from the remote computer to
  4259. the local computer is as follows:
  4260.  
  4261. ╔═══════════════════════════════════════════════════════════════╗
  4262. ║                                                               ║
  4263. ║  Command Format:  get <remote-file> [local-file]              ║
  4264. ║                                                               ║
  4265. ║     remote-file - the filename on the remote computer         ║
  4266. ║                                                               ║
  4267. ║     local-file  - the filename on the local computer          ║
  4268. ║                                                               ║
  4269. ╚═══════════════════════════════════════════════════════════════╝
  4270.  
  4271. This FTP command will retrieve the remote-file and store it on
  4272. the Multimax.  If the local-file name is not specified, the name
  4273. of the file on the Multimax will be the same as it was on the
  4274. remote computer.  The current settings for type, form, mode, and
  4275. structure will be used during the file transfer.
  4276.  
  4277.  
  4278. VAX Sample Session:
  4279.  
  4280. ┌───────────────────────────────────────────────────────────────┐
  4281. │ ftp>get overview.dat                                          │
  4282. │ 200 PORT Command OK.                                          │
  4283. │ 125 File transfer started correctly                           │
  4284. │ 226 File transfer completed ok                                │
  4285. │ local: overview.dat remote: overview.dat                      │
  4286. │ 884 bytes received in 0.04 seconds (22 Kbytes/s)              │
  4287. │ ftp>                                                          │
  4288. └───────────────────────────────────────────────────────────────┘
  4289.  
  4290. Messages 200, 125, and 226 let you know that the file transferred
  4291. properly.  The next line shows the local-filename, in this case
  4292. we didn't specify the local-filename, so the remote-filename and
  4293. the local-filename are the same.  The next line shows the number
  4294. of bytes transferred and the amount of time it took to transfer
  4295. the file.
  4296. CYBER Sample Session:
  4297.  
  4298. ┌───────────────────────────────────────────────────────────────┐
  4299. │ ftp>get prolog8                                               │
  4300. │ 220 COMMAND OKAY.                                             │
  4301. │ 150 FILE STATUS OKAY; ABOUT TO OPEN DATA CONNECTION.          │
  4302. │ 226 CLOSING DATA CONNECTION.                                  │
  4303. │ local: prolog8 remote: prolog8                                │
  4304. │ 41 bytes received in 0.8 seconds (0.05 Kbytes/s)              │
  4305. │ ftp>                                                          │
  4306. └───────────────────────────────────────────────────────────────┘
  4307. 7.3.1  Changing the Local Directory
  4308.  
  4309.  
  4310. The directory on the local computer can be changed to any
  4311. directory you desire.  This is called the working directory. 
  4312. This is the directory where files that are transferred from the
  4313. remote computer will be stored.
  4314.  
  4315. The syntax of the command to change local working directory is as
  4316. follows:
  4317.  
  4318. ╔═══════════════════════════════════════════════════════════════╗
  4319. ║                                                               ║
  4320. ║  Command Format:  lcd [dirname]                               ║
  4321. ║                                                               ║
  4322. ║     dirname - the name of the new local working directory     ║
  4323. ║                                                               ║
  4324. ║    if directory is omitted, the home directory is assumed     ║
  4325. ║                                                               ║
  4326. ╚═══════════════════════════════════════════════════════════════╝
  4327.  
  4328. Sample Session:
  4329.  
  4330. ┌───────────────────────────────────────────────────────────────┐
  4331. │ ftp>lcd /user0/student0                                       │
  4332. │ Local directory now /user0/student0                           │
  4333. │ ftp>                                                          │
  4334. └───────────────────────────────────────────────────────────────┘
  4335.  
  4336. Absolute or relative pathnames can be specified for directory.
  4337. 7.3.2  Listing the Contents
  4338.  
  4339.  
  4340. Any UNIX command can be entered from the FTP utility.  You must
  4341. preface the command with the FTP command that invokes the
  4342. interactive shell.  
  4343.  
  4344. The syntax to invoke the interactive shell is as follows:
  4345.  
  4346. ╔═══════════════════════════════════════════════════════════════╗
  4347. ║                                                               ║
  4348. ║  Command Format:  ! [command [arguments]]                     ║
  4349. ║                                                               ║
  4350. ║     command - any valid UNIX command, if omitted the          ║
  4351. ║               interactive shell is invoked                    ║
  4352. ║                                                               ║
  4353. ║   arguments - if supplied are arguments to the UNIX command   ║
  4354. ║                                                               ║
  4355. ╚═══════════════════════════════════════════════════════════════╝
  4356.  
  4357.  
  4358. If arguments are provided, the first argument is considered to be
  4359. the UNIX command and the remaining arguments are considered to be
  4360. arguments to that command.
  4361.  
  4362.  
  4363. Example:
  4364.  
  4365. .................................................................
  4366. . ftp>!ls -la                                                   .
  4367. .................................................................
  4368.  
  4369.  
  4370. This command will display the contents of the local working
  4371. directory.  The l option specifies the 'long' listing, and the a
  4372. option requests all files including the initialization files.
  4373. 7.4  Remote Computer Commands
  4374.  
  4375.  
  4376. From the FTP prompt, you can issue commands to the remote
  4377. computer to display files or show the contents of the remote
  4378. directory.  Recall that the commands you enter are FTP commands;
  4379. and although they look like UNIX commands, they are not.
  4380.  
  4381. Transferring file(s) from the Multimax to the remote computer is
  4382. accomplished with the following command: 
  4383.  
  4384. ╔═══════════════════════════════════════════════════════════════╗
  4385. ║                                                               ║
  4386. ║  Command Format:  put <local-file> [remote-file]              ║
  4387. ║                                                               ║
  4388. ║      local-file   - the filename on the local computer        ║
  4389. ║                                                               ║
  4390. ║      remote-file  - the filename on the remote computer       ║
  4391. ║                                                               ║
  4392. ╚═══════════════════════════════════════════════════════════════╝
  4393.  
  4394. This FTP command will retrieve the local-file, transfer it to the
  4395. remote computer, and store it in the remote directory.  If the
  4396. remote-file is not specified, the name of the file on the remote
  4397. computer will be the same as it was on the Multimax.  The current
  4398. settings for type, form, mode, and structure will be used during
  4399. the file transfer.
  4400.  
  4401.  
  4402. VAX sample sessions:
  4403.  
  4404. ┌───────────────────────────────────────────────────────────────┐
  4405. │ ftp>put memo                                                  │
  4406. │ 200 PORT Command OK.                                          │
  4407. │ 125 File transfer started correctly                           │
  4408. │ 226 File transfer completed ok                                │
  4409. │ local: memo remote: memo                                      │
  4410. │ 2299 bytes sent in 0.08 seconds (28 Kbytes/s)                 │
  4411. │ ftp>                                                          │
  4412. └───────────────────────────────────────────────────────────────┘
  4413.  
  4414. Messages 200, 125, and 226 let you know that the file transferred
  4415. properly.  The next line shows the local-filename.  In this case,
  4416. we didn't specify the local-filename, so the local-filename and
  4417. the remote-filename are the same.  The next line shows the number
  4418. of bytes sent and the amount of time for the transfer.
  4419. CYBER Sample Session:
  4420.  
  4421. ┌───────────────────────────────────────────────────────────────┐
  4422. │ ftp>put memo                                                  │
  4423. │ 200 COMMAND OKAY.                                             │
  4424. │ 150 FILE STATUS OKAY; ABOUT TO OPEN DATA CONNECTION.          │
  4425. │ 226 CLOSING DATA CONNECTION.                                  │
  4426. │ local:memo remote:memo                                        │
  4427. │ 2299 bytes sent in 0.08 seconds (28 Kbytes/s)                 │
  4428. │ ftp>                                                          │
  4429. └───────────────────────────────────────────────────────────────┘
  4430. 7.4.1  Changing the Remote Directory
  4431.  
  4432.  
  4433. The directory on the remote computer can be changed to any
  4434. directory you want.  This is called the remote working directory.
  4435. This is the directory where files that are sent from the Multimax
  4436. will be stored.
  4437.  
  4438. The syntax for the command to change remote working directory is
  4439. as follows:
  4440.  
  4441. ╔═══════════════════════════════════════════════════════════════╗
  4442. ║                                                               ║
  4443. ║  Command Format:  cd <remote-dirname>                         ║
  4444. ║                                                               ║
  4445. ║      remote-dirname - the name of the new remote working      ║
  4446. ║                       directory                               ║ 
  4447. ║                                                               ║
  4448. ╚═══════════════════════════════════════════════════════════════╝
  4449.  
  4450. VAX Sample Session:
  4451.                                                          
  4452. ┌───────────────────────────────────────────────────────────────┐
  4453. │ ftp>cd d_1131:[gholdaway]                                     │
  4454. │ 200 Working directory changed to D_1131:[GHOLDAWAY]           │
  4455. │ ftp>                                                          │
  4456. └───────────────────────────────────────────────────────────────┘
  4457.  
  4458. You must specify a valid directory on the remote computer.
  4459.  
  4460.  
  4461. CYBER Example:
  4462.  
  4463. .................................................................
  4464. . 502 COMMAND NOT IMPLEMENTED.                                  .
  4465. .................................................................
  4466.  
  4467. The reason this command is not implemented on the CYBER is
  4468. because NOS does not support the idea of directories.
  4469. 7.4.2  Listing the Contents
  4470.  
  4471. ╔═══════════════════════════════════════════════════════════════╗
  4472. ║                                                               ║
  4473. ║  Command Format:  ls [remote-dirname] [local-file]            ║
  4474. ║                                                               ║
  4475. ║      remote-dirname - working directory on remote computer    ║
  4476. ║                                                               ║
  4477. ║      local-file  - local file where the remote-directory      ║
  4478. ║                    contents will be written.  If omitted,     ║
  4479. ║                    the output is sent to the screen.          ║
  4480. ║                                                               ║
  4481. ╚═══════════════════════════════════════════════════════════════╝
  4482.  
  4483. VAX Sample Session:
  4484.  
  4485. ┌───────────────────────────────────────────────────────────────┐
  4486. │ ftp>ls                                                        │
  4487. │ 200 PORT Command OK.                                          │
  4488. │ 125 File transfer started correctly                           │
  4489. │ login.com;13                                                  │
  4490. │ jeff.;1                                                       │
  4491. │ test.com;1                                                    │
  4492. │ 226 File transfer completed ok                                │
  4493. │ 228 bytes received in 0.06 seconds (0.34 Kbytes/s)            │
  4494. │ ftp>                                                          │
  4495. └───────────────────────────────────────────────────────────────┘
  4496.  
  4497. Since no remote directory was specified, the contents of the
  4498. current working directory is transferred and no local file was
  4499. specified, so the output is displayed on the screen.
  4500.  
  4501.  
  4502. CYBER Sample Session:
  4503.  
  4504. ┌───────────────────────────────────────────────────────────────┐
  4505. │ ftp>ls                                                        │
  4506. │ 200 COMMAND OKAY.                                             │
  4507. │ 150 FILE STATUS OKAY; ABOUT TO OPEN DATA CONNECTION.          │
  4508. │ PROLOG8                                                       │
  4509. │ FSEP1A                                                        │
  4510. │ FSEP1                                                         │
  4511. │ FSEP2                                                         │
  4512. │ 226 CLOSING DATA CONNECTION.                                  │
  4513. │ 52 bytes received in 1 seconds (0.05 Kbytes/s)                │
  4514. │ ftp>                                                          │
  4515. └───────────────────────────────────────────────────────────────┘
  4516. 7.5  Closing the Connection
  4517.  
  4518.  
  4519. The current FTP session with the remote server can be terminated
  4520. without leaving FTP.  When the current session is terminated a
  4521. session to another remote FTP server can be initiated.
  4522.  
  4523. ╔═══════════════════════════════════════════════════════════════╗
  4524. ║  Command Format:  close                                       ║
  4525. ╚═══════════════════════════════════════════════════════════════╝
  4526.  
  4527.  
  4528. This command will terminate the current FTP session with the
  4529. remote server and return to the FTP command interpreter.
  4530.  
  4531.  
  4532. VAX Sample Session:
  4533.  
  4534. ┌───────────────────────────────────────────────────────────────┐
  4535. │ ftp>close                                                     │
  4536. │ 221 Goodbye.                                                  │
  4537. │ ftp>                                                          │
  4538. └───────────────────────────────────────────────────────────────┘
  4539.  
  4540.  
  4541. CYBER Sample Session:
  4542.  
  4543. ┌───────────────────────────────────────────────────────────────┐
  4544. │ ftp>close                                                     │
  4545. │ 221 SERVICE CLOSING CONTROL CONNECTION. LOGGED OUT.           │
  4546. │ ftp>                                                          │
  4547. └───────────────────────────────────────────────────────────────┘
  4548. 7.6  Exiting FTP
  4549.  
  4550.  
  4551. When you have finished using FTP, the following command will
  4552. terminate FTP and return control to the shell.
  4553.  
  4554. ╔═══════════════════════════════════════════════════════════════╗
  4555. ║  Command Format:  quit                                        ║
  4556. ╚═══════════════════════════════════════════════════════════════╝
  4557.  
  4558. This command will terminate the current FTP session and exit FTP.
  4559.  
  4560.  
  4561. VAX Sample Session:
  4562.                                                          
  4563. ┌───────────────────────────────────────────────────────────────┐
  4564. │ ftp>quit                                                      │
  4565. │ 221 Goodbye.                                                  │
  4566. │ $                                                             │
  4567. └───────────────────────────────────────────────────────────────┘
  4568.  
  4569.  
  4570. CYBER Sample Session:
  4571.  
  4572. ┌───────────────────────────────────────────────────────────────┐
  4573. │ ftp>quit                                                      │
  4574. │ 221 SERVICE CLOSING CONTROL CONNECTION. LOGGED OUT.           │
  4575. │ $                                                             │
  4576. └───────────────────────────────────────────────────────────────┘
  4577. 7.7  Special FTP Commands
  4578.  
  4579.  
  4580. This section will discuss some FTP commands that are useful in
  4581. using FTP.  They include an on-line help, status, and the !
  4582. character.
  4583.  
  4584. The help command will display all of the FTP commands on the
  4585. screen.
  4586.  
  4587. ╔═══════════════════════════════════════════════════════════════╗
  4588. ║                                                               ║
  4589. ║  Command Format:  help [command]                              ║
  4590. ║                                                               ║
  4591. ║      command  - an FTP command                                ║
  4592. ║                                                               ║
  4593. ║     if omitted, prints a list of all known commands           ║
  4594. ║                                                               ║
  4595. ╚═══════════════════════════════════════════════════════════════╝
  4596.  
  4597. Sample Session:
  4598.  
  4599. ┌───────────────────────────────────────────────────────────────┐
  4600. │ ftp>help get                                                  │
  4601. │ get         receive file                                      │
  4602. │ ftp>                                                          │
  4603. └───────────────────────────────────────────────────────────────┘
  4604.  
  4605.  
  4606. There is a synonym for the help command.  It works in the same
  4607. way as the help command.
  4608.  
  4609. ╔═══════════════════════════════════════════════════════════════╗
  4610. ║  Command Format:  ? [command]                                 ║
  4611. ╚═══════════════════════════════════════════════════════════════╝
  4612.  
  4613.  
  4614. Sample Session:
  4615.  
  4616. ┌───────────────────────────────────────────────────────────────┐
  4617. │ ftp>? put                                                     │
  4618. │ put          send one file                                    │
  4619. │ ftp>                                                          │
  4620. └───────────────────────────────────────────────────────────────┘
  4621. FTP status can be displayed on the screen by entering the
  4622. following command:
  4623.  
  4624. ╔═══════════════════════════════════════════════════════════════╗
  4625. ║  Command Format:  status                                      ║
  4626. ╚═══════════════════════════════════════════════════════════════╝
  4627.  
  4628.  
  4629. Sample Session:
  4630.  
  4631. ┌───────────────────────────────────────────────────────────────┐
  4632. │ ftp>status                                                    │
  4633. │ Connected to ERC830.                                          │
  4634. │ No proxy connection.                                          │
  4635. │ Mode: stream; Type: ascii; Form: non-print; Structure: file   │
  4636. │ Verbose: on; Bell: off; Prompting: on; Globbing: on           │
  4637. │ Store unique: off; Receive unique: off                        │
  4638. │ Case: off; CR stripping: on                                   │
  4639. │ Ntrans: off                                                   │
  4640. │ Nmap: off                                                     │
  4641. │ Hash mark printing: off; Use of PORT cmds: on                 │
  4642. │ ftp>                                                          │
  4643. └───────────────────────────────────────────────────────────────┘
  4644.  
  4645. These are the default settings.  The meaning of these settings
  4646. and how to change them are found in the supplemental material at
  4647. the end of this manual.
  4648.  
  4649. There are a few "bugs" in FTP.
  4650.  
  4651. Correct execution of many FTP commands depends upon the remote
  4652. server.  The VAX server is supplied by The Wollongong Group, Inc.
  4653. If you encounter problems transferring files to/from the
  4654. Multimax, please bring them to the attention of the User Support
  4655. Branch or call the Hotline (FTS 776-4688 or 6-HOTT).
  4656. 7.8  Introducing UMAX TELNET
  4657.  
  4658.  
  4659. TELNET protocol will allow communication with another host.  The
  4660. TELNET protocol can be invoked from either the Annex prompt or
  4661. from the shell prompt while you are logged into the Multimax.  If
  4662. you invoke TELNET while logged into the Multimax, that session
  4663. will continue to be charged at the appropriate rate.  The new
  4664. session to another host will also charge the account.  This means
  4665. you are paying connect charges on both systems.
  4666.  
  4667. The syntax to invoke TELNET is as follows:
  4668.  
  4669. ╔═══════════════════════════════════════════════════════════════╗
  4670. ║                                                               ║
  4671. ║  Command Format:  telnet [host [port]]                        ║
  4672. ║                                                               ║
  4673. ║      host  - the host name                                    ║
  4674. ║                                                               ║
  4675. ║      port  - the port number, if not given, use default       ║
  4676. ║                                                               ║
  4677. ╚═══════════════════════════════════════════════════════════════╝
  4678.  
  4679. Sample Session:
  4680.  
  4681. ┌───────────────────────────────────────────────────────────────┐
  4682. │ $telnet                                                       │
  4683. │ telnet>                                                       │
  4684. └───────────────────────────────────────────────────────────────┘
  4685.  
  4686. The telnet> prompt indicates that telnet commands can now be
  4687. entered.  If no parameters are given, telnet enters the command
  4688. mode.
  4689.  
  4690. In order to create a connection to another host from command
  4691. mode, use the open command.
  4692.  
  4693. ╔═══════════════════════════════════════════════════════════════╗
  4694. ║  Command format:  open <host> [port]                          ║
  4695. ║                                                               ║
  4696. ║     host - host name                                          ║
  4697. ║                                                               ║
  4698. ║     port - port number, optional                              ║
  4699. ╚═══════════════════════════════════════════════════════════════╝
  4700. Sample session:
  4701.  
  4702. ┌───────────────────────────────────────────────────────────────┐
  4703. │ telnet>open erc830                                            │
  4704. │ Trying...                                                     │
  4705. │ Connected to erc830.                                          │
  4706. │ Escape character is '^]'.                                     │
  4707. │                                                               │
  4708. │ (Warning message from VAX)                                    │
  4709. │                                                               │
  4710. │ Username:                                                     │
  4711. └───────────────────────────────────────────────────────────────┘
  4712.  
  4713. If you enter the host name on the same command line as telnet,
  4714. the open command will be done for you.
  4715.  
  4716.  
  4717. Sample Session:
  4718.  
  4719. ┌───────────────────────────────────────────────────────────────┐
  4720. │ $telnet erc830                                                │
  4721. │ Trying...                                                     │
  4722. │ Connected to erc830.                                          │
  4723. │ Escape character is '^]'.                                     │
  4724. │                                                               │
  4725. │ ( Warning message from VAX)                                   │
  4726. │                                                               │
  4727. │ Username:                                                     │
  4728. └───────────────────────────────────────────────────────────────┘
  4729.  
  4730. When you logout of the destination host, you will be
  4731. automatically brought back to the originating host. 
  4732.  
  4733.  
  4734. Sample Session:
  4735.  
  4736. ┌───────────────────────────────────────────────────────────────┐
  4737. │ $lo                                                           │
  4738. │ Connection closed by foreign host .L-1990 15:57:42.19         │
  4739. │ $                                                             │
  4740. └───────────────────────────────────────────────────────────────┘
  4741. The first $ prompt is the VMS prompt.  The lo command logs you
  4742. out of the VAX.  Notice that we get the connection closed
  4743. message, and the next $ prompt is back to the Multimax.
  4744. The connection that was created was closed.  There is a TELNET
  4745. command to close the connection as well.
  4746.  
  4747. ╔═══════════════════════════════════════════════════════════════╗
  4748. ║  Command Format:  close                                       ║
  4749. ╚═══════════════════════════════════════════════════════════════╝
  4750.  
  4751. This TELNET command will close the connection and return to the
  4752. TELNET command mode.
  4753.  
  4754. To exit TELNET, enter the following command at the telnet>
  4755. prompt.
  4756.      
  4757. ╔═══════════════════════════════════════════════════════════════╗
  4758. ║  Command Format:  quit                                        ║
  4759. ╚═══════════════════════════════════════════════════════════════╝
  4760.  
  4761. This command will close any open TELNET session and exit TELNET. 
  4762. An end-of-file (in command mode) will also close a session and
  4763. exit.
  4764.  
  4765. The current status of TELNET can be shown by entering the
  4766. following command:
  4767.  
  4768. ╔═══════════════════════════════════════════════════════════════╗
  4769. ║  Command Format:  status                                      ║
  4770. ╚═══════════════════════════════════════════════════════════════╝
  4771.  
  4772.  
  4773. Sample Session:
  4774.  
  4775. ┌───────────────────────────────────────────────────────────────┐
  4776. │ telnet>status                                                 │
  4777. │ Connected to erc830.                                          │
  4778. │ Operating in character-at-a-time mode.                        │
  4779. │ Escape character is '^]'.                                     │
  4780. │                                                               │
  4781. │ telnet>                                                       │
  4782. └───────────────────────────────────────────────────────────────┘
  4783. A listing of TELNET commands can be displayed by entering the
  4784. following command at the TELNET command mode prompt telnet>:
  4785.  
  4786. ╔═══════════════════════════════════════════════════════════════╗
  4787. ║  Command Format:  help                                        ║
  4788. ║                                                               ║
  4789. ║                   ?                                           ║
  4790. ╚═══════════════════════════════════════════════════════════════╝
  4791.  
  4792.  
  4793. Sample Session:
  4794.  
  4795. ┌───────────────────────────────────────────────────────────────┐
  4796. │ telnet>help                                                   │
  4797. │ Commands may be abbreviated. Commands are:                    │
  4798. │                                                               │
  4799. │ close     close current connection                            │
  4800. │ display   display operating parameters                        │
  4801. │ mode      try to enter line-by-line or char-at-a-time mode    │
  4802. │ open      connect to a site                                   │
  4803. │ quit      exit telnet                                         │
  4804. │ send      transmit special characters ('send ?' for more)     │
  4805. │ set       set operating parameters ('set ?' for more)         │
  4806. │ status    print status information                            │
  4807. │ toggle    toggle operating parameters ('toggle ?' for more)   │
  4808. │ z         suspend telnet                                      │
  4809. │ ?         print help information                              │
  4810. │ telnet>                                                       │
  4811. └───────────────────────────────────────────────────────────────┘
  4812. Workshop 7
  4813.  
  4814.  
  4815. This workshop will reinforce your understanding of the topics
  4816. covered in this chapter.  Login to the Multimax with the username
  4817. and password given to you by the instructor.  Each student is to
  4818. complete the entire workshop.  Computer exercises might need to
  4819. be worked as a team.
  4820.  
  4821.  
  4822. COMPUTER EXERCISES
  4823.  
  4824.  
  4825. 1.     Log into the Multimax.
  4826.  
  4827. Questions 2 through 11 have to do with a connection between the
  4828. local computer (Multimax) and the remote computer (VAX).
  4829.  
  4830.  
  4831. 2.     Initialize FTP on the Multimax and create a connection to
  4832.        the VAX.  (Hint: open)
  4833.  
  4834.  
  4835.        What is the remote computer default username? 
  4836.        How can you enter a different username? 
  4837.  
  4838.  
  4839.  
  4840.  
  4841. 3.     What files are on the remote computer's directory?
  4842.        (Hint: If you can't remember the FTP command, how can you                           
  4843.        find out?)
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849. 4.     What is the default type?  (Hint: status)
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.                                   Continue on the next page
  4857. 5.     Transfer the file "memo" from the Multimax to the VAX.
  4858.        Change the name of the file on the VAX to "memo.doc". 
  4859.  
  4860.  
  4861.  
  4862.  
  4863. 6.     Transfer the file "DATA.MAY" from the VAX to the Multimax.
  4864.        Keep the same filename on both platforms.
  4865.  
  4866.  
  4867.  
  4868.  
  4869. 7.     Without entering it, what FTP command would you enter to
  4870.        change the remote computer working directory to
  4871.        D_1131:[STUDENT]? 
  4872.  
  4873.  
  4874.  
  4875.  
  4876. 8.     Enter the FTP command to list the contents of the local
  4877.        computer working directory. What files are present?
  4878.  
  4879.  
  4880.  
  4881.  
  4882. 9.     Enter the FTP command to list the contents of the remote
  4883.        computer working directory. What files are present?
  4884.  
  4885.  
  4886.  
  4887.  
  4888. 10.    Without entering the command, how would you change the
  4889.        remote working directory to D_1131:[STUDENT1]?
  4890.  
  4891.  
  4892.  
  4893.  
  4894. 11.    What changes would you have to make in order to
  4895.        transfer a binary file from the Multimax to the VAX?
  4896.  
  4897.  
  4898.  
  4899.                                   Continue on the next page
  4900.                                          ** NOTE **
  4901.  
  4902. Questions 12 through 20 have to do with a connection between the
  4903. local computer (Multimax) and the remote computer (CYBER).
  4904.  
  4905.  
  4906. 12.    Close the connection with the VAX and then open a connection
  4907.        to the CYBER.
  4908.  
  4909.  
  4910.  
  4911.  
  4912. 13.    What files are on the remote computer's directory?
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918. 14.    What is the default type?  (Hint: status)
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924. 15.    Transfer the file "memo" from the Multimax to the CYBER.
  4925.        Change the name on the CYBER to a filename of your choice.
  4926.  
  4927.  
  4928.  
  4929.  
  4930. 16.    Transfer the file "MAYDATA" from the CYBER to the Multimax.
  4931.        Keep the same filename on both platforms.
  4932.  
  4933.  
  4934.  
  4935.  
  4936. 17.    Without entering it, what FTP command would you enter to
  4937.        change the remote computer working directory?
  4938.  
  4939.  
  4940.  
  4941.  
  4942. 18.    Enter the FTP command to list the contents of the local
  4943.        computer working directory.
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.                                   Continue on the next page
  4952. 19.    Enter the FTP command to list the contents of the remote
  4953.        computer working directory.
  4954.  
  4955.  
  4956.  
  4957.  
  4958. 20.    Close the connection with the CYBER and exit FTP.
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.                                   Continue on the next page
  5004.                                          ** NOTE **
  5005.  
  5006. The following questions have to do with your understanding of the
  5007. Telnet communications protocol.
  5008.  
  5009.  
  5010. 21.    Enter the command to invoke the Telnet protocol.
  5011.  
  5012.  
  5013.  
  5014.  
  5015.  
  5016. 22.    Open a connection to the VAX.
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022. 23.    Enter a valid username and password.
  5023.  
  5024.  
  5025.  
  5026.  
  5027.  
  5028. 24.    Are you logged into the VAX or the Multimax?
  5029.  
  5030.  
  5031.  
  5032.  
  5033. 25.    Enter the command to exit the VAX. (Hint: logoff)
  5034.  
  5035.  
  5036.  
  5037.  
  5038.  
  5039. 26.    Are you logged into the VAX or the Multimax?
  5040.  
  5041.  
  5042.  
  5043.  
  5044.  
  5045. 27.    Are you confused? Logout of the Multimax and the Annex.
  5046.  
  5047.                                             NOTES
  5048. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5049. 8. INTRODUCTION TO vi
  5050.  
  5051.  
  5052. The vi editor was developed at the University of California,
  5053. Berkeley.  It was originally included as part of BSD UNIX.  It
  5054. became an official part of AT&T UNIX with the release of System
  5055. V.  Before vi was invented, the standard UNIX editor was ed.  The
  5056. ed editor was line oriented and made it difficult to see the
  5057. context of the file being edited.
  5058.  
  5059. The next progression was an editor called ex.  The ex editor had
  5060. some distinct advantages over ed.  It allowed you to display an 
  5061. entire screen of text instead of just one line at a time.  While
  5062. in the ex editor, you could give the command vi (for visual
  5063. mode).  Users used the visual mode so much that developers of ex
  5064. made it possible to use the display editing feature without
  5065. having to enter ex and then vi.  They called the new facility
  5066. simply vi.
  5067.  
  5068. The vi editor does its work in a work buffer.  When you start vi,
  5069. it copies the disk file into the work buffer.  During the editing
  5070. session, changes are made to this copy.  The contents of the disk
  5071. file are not changed until you write the contents of the work
  5072. buffer to the disk file.
  5073.  
  5074. The command to enter the vi editor is:
  5075.  
  5076. ╔═══════════════════════════════════════════════════════════════╗
  5077. ║  Command Format:  vi <file1>                                  ║
  5078. ║                                                               ║
  5079. ║      file1 - the filename to edit                             ║
  5080. ╚═══════════════════════════════════════════════════════════════╝
  5081.                                                                  
  5082. Your screen is cleared, then the first lines of the file are
  5083. displayed, and the cursor is positioned at the top of the screen. 
  5084. The bottom line of your screen is reserved for certain command
  5085. mode activities and for error and status messages and does not
  5086. contain any of the file's text.  If the file already exists, the
  5087. bottom line lists the filename in quotes and the number of lines
  5088. and characters it contains.  If the file is new, "New file" is
  5089. displayed next to the filename.  If the file does not fill an
  5090. entire screen, a tilde (~) character appears in the leftmost
  5091. column of any blank lines.
  5092.  
  5093. By default, you are always in command mode at the start of a vi
  5094. session.  The most common command mode activities are:
  5095.  
  5096.        cursor positioning
  5097.        entering text mode
  5098.        moving, copying, and deleting text
  5099.        storing changes
  5100.        quitting
  5101. Whenever you wish to return to command mode, or are unsure of
  5102. what mode you are in, press the Esc key.
  5103.  
  5104. Esc can be entered any number of times without harm.  The Esc key
  5105. on the VT terminals is the Ctrl-3 combination.  On the PC, it is
  5106. the key marked Esc.
  5107. 8.1  vi: Cursor Positioning
  5108.  
  5109.  
  5110. Below is a list of cursor positioning commands.  Characters are
  5111. not echoed on your screen when one of these commands is executed. 
  5112. The cursor simply moves to the desired location.  If a command is
  5113. not accepted, the cursor remains where it is.  The current line
  5114. is defined as the line on which the cursor currently resides. 
  5115. The letter N is a repeat factor.
  5116.  
  5117.  
  5118. N+            move down N lines from current line.  The cursor can be
  5119.               anyplace on the current line.  When complete, the
  5120.               cursor will be located at the first character on the
  5121.               line N lines down from the current line.
  5122.  
  5123.  
  5124. N-            move up N lines from current line.  The cursor can be
  5125.               anyplace on the current line.  When complete, the
  5126.               cursor will be located on the first character on the
  5127.               line located N lines up from the current line.
  5128.  
  5129. (Ret)         The cursor can be located anyplace on the current line. 
  5130.               The will be on the first character of the next line.
  5131.  
  5132. $             The cursor will move to the end of the current line
  5133.  
  5134. NG            This command will move the cursor to line N.  Default
  5135.               is to move to the last line.
  5136.  
  5137.  
  5138. Ctrl-D        move down 1/2 screen (11 lines)
  5139.  
  5140. Ctrl-U        move up 1/2 screen (11 lines)
  5141.  
  5142.  
  5143. NOTE:         Words are delimited by spaces (ie., a word
  5144.               begins and ends with a space).
  5145.  
  5146.  
  5147. Nw            The cursor will be on the first character of the word
  5148.               located N words from the current word.  The current
  5149.               word is the word where the cursor is located.  The
  5150.               default is to skip to the beginning of the next word.
  5151.  
  5152. Nb            The cursor will be on the first character of the word
  5153.               located N words back from the current word.  The
  5154.               default is to skip back to the beginning of the
  5155.               previous word.
  5156.  
  5157. e             The cursor will skip to the end of the current word.
  5158. The following keys are also defined for moving around the screen:
  5159.  
  5160. h             back one space       
  5161.  
  5162. j             down one line            
  5163.  
  5164. k             up one line           
  5165.  
  5166. l             forward one space               
  5167.  
  5168. The arrow keys will also work.
  5169.  
  5170. CAUTION NOTE:        If you hold the arrow key down to move quickly to
  5171.                      another area of the text, a line might be inserted
  5172.                      into your file.
  5173. 8.2  vi: Text Mode
  5174.  
  5175.  
  5176. Several commands in command mode allow you to enter text.  Once
  5177. the command is entered, all other characters that you type are
  5178. inserted in your text until you press the Esc key. 
  5179.  
  5180.  
  5181. To add text, use:
  5182.  
  5183. I      enter text mode, additional text appears at the beginning of
  5184.        the current line.
  5185.  
  5186. i      enter text mode, additional text appears before the current
  5187.        cursor position.
  5188.  
  5189. A      enter text mode, additional text appears at the end of the                          
  5190.        current line.
  5191.  
  5192. a      enter text mode, additional text appears after the current
  5193.        position.
  5194.  
  5195. O      enter text mode, open a line above the current line.
  5196.  
  5197. o      enter text mode, open a line below the current line.
  5198.  
  5199.  
  5200. To replace text, use:
  5201.  
  5202. R      replace characters until Esc
  5203.  
  5204. r      replace one character at current cursor position, then
  5205.        return to command mode
  5206.  
  5207.  
  5208. To substitute text, use:
  5209.  
  5210. Ns     substitute character for the current N characters until
  5211.        Esc.  Default is to substitute for the current
  5212.        character until Esc.
  5213. 8.3  vi: Deleting Text
  5214.  
  5215.  
  5216. vi commands for deleting text take effect relative to the
  5217. cursor's current position.  Text deletion commands are not echoed
  5218. on your screen.
  5219.  
  5220. Ndd    delete N lines starting at the current line.  The
  5221.        default is to delete the current line.
  5222.  
  5223. Ndw    delete N words starting with the current word.  The
  5224.        default is to delete the current word.
  5225.  
  5226. Nx     delete N characters starting at the current cursor
  5227.        position.  The default is to delete one character.
  5228.  
  5229. D      delete remainder of line
  5230. 8.4  vi: Copying Text
  5231.  
  5232.  
  5233. Copying text is performed using one of the "yank and put" command
  5234. pairs.  The most straight forward command sequence for copying
  5235. is:
  5236.  
  5237.        1.     Yank a word, line, or number of lines.  A copy of the
  5238.               yanked text is stored invisibly.  The original text is 
  5239.               not disturbed.
  5240.  
  5241.        2.     Move the cursor to the desired location.
  5242.  
  5243.        3.     Put the yanked copy into place.
  5244.  
  5245.        4.     Move the cursor to the next block of text you want to                         
  5246.               copy, then go to step 1.
  5247.  
  5248.  
  5249. Here are some yank and put commands:
  5250.  
  5251.  
  5252. NY     yank N lines.  Default is to yank one line.
  5253.  
  5254. Nyw    yank N words.  Default is to yank one word.
  5255.  
  5256. P      put yanked lines above current cursor position
  5257.                                              or 
  5258.        put yanked words before current cursor position
  5259.  
  5260.  
  5261. p      put yanked lines below current cursor position
  5262.                                              or
  5263.        put yanked words after current cursor position
  5264. 8.5  vi: Moving Text
  5265.  
  5266.  
  5267. Moving text from one area to another can be accomplished in
  5268. several different ways.  You can use whichever method is the
  5269. easiest for you to remember.
  5270.  
  5271.        1.     Yank, put, and delete:
  5272.  
  5273.               a.     Yank the desired text.
  5274.  
  5275.               b.     Move the cursor to the new location and then "put"
  5276.                      the "yanked" text into its new location.
  5277.  
  5278.               c.     Move the cursor back to the original text and      
  5279.                      delete it.
  5280.  
  5281.  
  5282.                                              or
  5283.  
  5284.        2.     Delete and put:
  5285.  
  5286.               a.     Delete the desired text 
  5287.  
  5288.               b.     Move the cursor to the new location
  5289.  
  5290.               c.     Use a put command to add the text.
  5291.  
  5292.  
  5293.  
  5294. NOTE:         The delete command stores an invisible copy
  5295.               of the deleted text in a buffer.  This is
  5296.               done so the undo command is capable of
  5297.               restoring the previous command.  That's why
  5298.               it is possible to move that deleted text to
  5299.               another area.
  5300. 8.6  vi: Restoring the Last Change
  5301.  
  5302.  
  5303. The Undo command will reverse the last command you just entered. 
  5304. It will restore text that you have changed or deleted by mistake. 
  5305. The undo command will undo only the most recently changed text.
  5306.  
  5307. ╔═══════════════════════════════════════════════════════════════╗
  5308. ║  Command Format:  u                                           ║
  5309. ║                                                               ║
  5310. ║    u - undo the last change                                   ║
  5311. ║                                                               ║
  5312. ║      U - restore the current line to the way it was before you  ║
  5313. ║        started changing it, even if several changes were made ║
  5314. ║                                                               ║
  5315. ╚═══════════════════════════════════════════════════════════════╝
  5316.  
  5317. If you delete a line and then change a word, undo will restore
  5318. the changed word but will not restore the line.
  5319. 8.7  vi: Recovering Text After a Crash
  5320.  
  5321.  
  5322. You can often recover text that would have been lost because of a
  5323. system crash.  When the system has been brought back up enter the
  5324. following command to see if the system saved a copy of your work
  5325. buffer:
  5326.  
  5327.  
  5328. Example:
  5329.  
  5330. .................................................................
  5331. . $vi -r filename                                               .
  5332. .................................................................
  5333.  
  5334.  
  5335. If your work buffer was saved, you will be editing a recent copy
  5336. of the work buffer.  Use the w command to write the edited
  5337. version to the disk file.
  5338.  
  5339. The -r option will recover the version of filename that was in
  5340. the buffer when the crash occurred.  If no buffer was saved, the
  5341. editor will assume you are going to edit a new empty file called
  5342. filename.
  5343. 8.8  vi: Saving Text and Quitting
  5344.  
  5345.  
  5346. Commands to save (write) text and to quit are entered from the
  5347. Last Line Mode.  The Last Line Mode is entered by entering a
  5348. colon (:) character from the command mode.
  5349.  
  5350. To save changes without exiting vi, enter:
  5351.  
  5352.  
  5353. Example:
  5354.  
  5355. .................................................................
  5356. . :w                                                            .
  5357. .................................................................
  5358.  
  5359. This command is displayed on the status line as it is typed in. 
  5360. The commands are executed by pressing the Enter key.  The file's
  5361. name and number of lines and characters are displayed on the
  5362. status line.  With no option, the work buffer will be written
  5363. back to the original disk file.  If, for some reason, you don't
  5364. have write permission to the working directory, you can copy the
  5365. work buffer to another file by specifying the complete pathname
  5366. of a temporary file.
  5367.  
  5368.  
  5369. Example:
  5370.  
  5371. .................................................................
  5372. . :w /user0/rharding/temp                                       .
  5373. .................................................................
  5374.  
  5375. Now you can exit vi and not lose any of your work.  The editing
  5376. session is saved in the file /user/rharding/temp.
  5377.  
  5378. To exit vi without saving any of the changes since the last :w
  5379. (or to discard all changes if no :w), enter:
  5380.  
  5381.  
  5382. Example:
  5383.  
  5384. .................................................................
  5385. . :q!                                                           .
  5386. .................................................................
  5387.  
  5388. The exclamation mark (!) (in slang, it's a bang) indicates to 
  5389. quit the current editing session, regardless.  If you just enter
  5390. q alone, the editor will warn you that existing changes were not
  5391. saved.  It is difficult to get out of this mode.  Use the
  5392. exclamation mark to indicate do the exit no matter what and not
  5393. save the changes since the last w command.
  5394. To save and quit, enter:
  5395.  
  5396.  
  5397. Example:
  5398.  
  5399. .................................................................
  5400. . :wq                                                           .
  5401. .................................................................
  5402.  
  5403. The w command will write the work buffer to the disk file.  The q
  5404. command will exit the editor.  The shell prompt ($) will be
  5405. displayed after the file has been saved and the editor exited.
  5406. 8.9  Other vi Commands
  5407.  
  5408.  
  5409. To save the file you are editing under a different name, use:
  5410.  
  5411.  
  5412. Example:
  5413.  
  5414. .................................................................
  5415. . :w newfile                                                    .
  5416. .................................................................
  5417.  
  5418. To copy in the contents of another file, position the cursor on
  5419. the last line you want to be above the new text, then execute:
  5420.  
  5421.  
  5422. Example:
  5423.  
  5424. .................................................................
  5425. . :r filename                                                   .
  5426. .................................................................
  5427.  
  5428. The contents of filename will appear on your screen below the
  5429. last cursor position.  The existing text will be moved down.
  5430.  
  5431. To include the output of a shell command (i.e., date) in the file
  5432. you are editing, position the cursor as described above, then
  5433. enter:
  5434.  
  5435.  
  5436. Example:
  5437.  
  5438. .................................................................
  5439. . :r !shell-cmd                                                 .
  5440. .................................................................
  5441.  
  5442. To execute a shell command without including its output in your
  5443. file, enter:
  5444.  
  5445.  
  5446. Example:
  5447.  
  5448. .................................................................
  5449. . :!shell-cmd                                                   .
  5450. .................................................................
  5451.  
  5452. This feature enables you to check man pages or the contents of
  5453. other files without exiting vi.
  5454.                                             NOTES
  5455. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5456. Workshop 8
  5457.  
  5458.  
  5459. This workshop will reinforce your understanding of the topics
  5460. covered in this chapter.  Login to the Multimax with the username
  5461. and password given to you by the instructor.  Each student is to
  5462. complete the entire workshop.  Computer exercises might need to
  5463. be worked as a team.
  5464.  
  5465. 1.     Login to the Multimax.
  5466.  
  5467.  
  5468.  
  5469.  
  5470. 2.     Edit the file rocket.sh .
  5471.      (Hint: vi rocket.sh)
  5472.  
  5473.  
  5474.  
  5475. 3.     Position the cursor at the beginning of line 10.
  5476.  
  5477.  
  5478.  
  5479.  
  5480. 4.     Move the cursor up five lines.
  5481.  
  5482.  
  5483.  
  5484.  
  5485. 5.     Move the cursor to the end of the current line.
  5486.        What vi command did you use?
  5487.  
  5488.  
  5489.  
  5490. 6.     Move the cursor to the first line of the file.
  5491.        What vi command did you use?
  5492.  
  5493.  
  5494.  
  5495. 7.     Move to the end of the file and insert a new line after it
  5496.        that contains the following text:
  5497.  
  5498.        fi
  5499.  
  5500.  
  5501. 8.     Remove all the blank lines from this file.
  5502.  
  5503.  
  5504.  
  5505.                                               
  5506.  
  5507.                                   Continue on the next page
  5508. 9.     Locate the word grop and change it to grep .
  5509.  
  5510.  
  5511.  
  5512.  
  5513.  
  5514. 10.    Add the following text after the last line of the file.
  5515.  
  5516.        rm ./temp$$
  5517.  
  5518.  
  5519.  
  5520.  
  5521. 11.    Now execute the script by typing rocket.sh
  5522.  
  5523.        (Hint: What are the permissions on this file?)
  5524.  
  5525.        If you did the editing correctly fireworks should appear. If 
  5526.        not, compare your script to /user0/teacher/rocket.sh
  5527.  
  5528.        To stop the fireworks enter the interrupt character (CTRL-C)
  5529.  
  5530.  
  5531.  
  5532. 12.    Create a file with a name of your own choice. Insert the
  5533.        output from the UNIX command ls -la .                   Save your change and
  5534.        exit vi.
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540. 13.    Edit the file you just created. Go to the end of the file 
  5541.        and without leaving vi, display a listing of the directory 
  5542.        /user0/teacher. How do you return to the editing session?
  5543.        Did the listing get inserted into your editing session?
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.  
  5552. 13.    What is the option to recover your changes after a system
  5553.        crash?
  5554.  
  5555.  
  5556.  
  5557.  
  5558.  
  5559. 14.    Logout of the Multimax and the Annex.
  5560. 9.  GETTING HELP
  5561.  
  5562.  
  5563. 9.1  Assist
  5564.  
  5565.  
  5566. The assist command is a menu driven utility that can provide
  5567. information on the following topics:
  5568.  
  5569.        1.     Information on a variety of UNIX topics
  5570.  
  5571.        2.     Tutorials
  5572.  
  5573.        3.     The ability to construct and execute command lines
  5574.  
  5575.        4.     A "pop up" menu for advanced users
  5576.  
  5577.  
  5578. Assist is set up so you do not have to know the exact command
  5579. name in order to get information or use the command.  To execute
  5580. assist enter:
  5581.  
  5582. ╔═══════════════════════════════════════════════════════════════╗
  5583. ║  Command Format:  assist  [name]                              ║
  5584. ║                   assist  [-s]                                ║
  5585. ║                   assist  [-c name]                           ║
  5586. ║                                                               ║
  5587. ║      name  - invoke an assist-supported UNIX system or        ║
  5588. ║              walkthru for name.                               ║
  5589. ║                                                               ║
  5590. ║        -s    - reinvoke the assist setup module to check or     ║
  5591. ║                modify the terminal variable.                    ║
  5592. ║                                                               ║
  5593. ║   -c name  - invoke the version of name that is in the        ║
  5594. ║                current directory.                               ║
  5595. ╚═══════════════════════════════════════════════════════════════╝
  5596. Sample session:
  5597.  
  5598. .................................................................
  5599. . $assist                                                       .
  5600. .................................................................
  5601.  
  5602. The first time assist is executed, assist will automatically
  5603. check your terminal capabilities and then runs a brief tutorial.
  5604. You can run the tutorial again by entering:
  5605.  
  5606.  
  5607. Sample session:
  5608.  
  5609. .................................................................
  5610. . $assist -s                                                    .
  5611. .................................................................
  5612.  
  5613. This command will also allow you to recheck your terminal setup.
  5614.  
  5615. The following is a list of useful assist commands:
  5616.  
  5617.        Ctrl-A               -      assist help
  5618.  
  5619.        Ctrl-O               -      help with current menu
  5620.  
  5621.        Ctrl-Y               -      help with current menu item
  5622.  
  5623.        Ctrl-T               -      call top level menu
  5624.  
  5625.        Ctrl-F               -      call "pop up" menu
  5626.  
  5627.        Ctrl-R               -      go back to previous menu
  5628.  
  5629.        (Ret),Ctrl-N         -      move cursor to next menu item
  5630.  
  5631.        Ctrl-P               -      return cursor to previous item
  5632.        
  5633.        Ctrl-G               -      select (execute) current menu item
  5634.  
  5635.        Ctrl-V               -      clear help message or prompt
  5636.        
  5637.        Ctrl-D               -      exit
  5638.  
  5639.  
  5640. Assist contains information on many, but not all, of the UMAX
  5641. commands.  In addition, not all options and possibilities for
  5642. each command are covered.  For complete information about a UMAX
  5643. command, please use the on-line manual pages.
  5644. 9.2  UNIX Primer Plus
  5645.  
  5646.  
  5647. This manual is intended to be the reference manual for UNIX.  It
  5648. has several handy features.  The inside of the front cover has a
  5649. listing of UNIX command and the page number on which a
  5650. description of the command and its options can be found.  In
  5651. addition, there are some quick reference sheets that can be
  5652. removed from the book and used at your terminal.  The book is
  5653. well written, humorous, and contains a lot of information about
  5654. UNIX.  There might be subtle differences between generic UNIX and
  5655. UMAX.
  5656.  
  5657. Another manual that is a good reference for UNIX is "A Practical
  5658. Guide to UNIX System V" by Mark G. Sobell. 
  5659.  
  5660.  
  5661. 9.3  TAB (Technical Assistance Bulletin)
  5662.  
  5663.  
  5664. The TAB is published monthly and contains current articles and
  5665. helpful hints for the Multimax minicomputers and UNIX in general.
  5666. To be added to the mailing list to receive a FREE subscription,
  5667. contact Gloria Armstrong (FTS) 776-4433 or (303) 236-4433.
  5668.  
  5669.  
  5670.  
  5671. 9.4  Local Support
  5672.  
  5673.  
  5674. If you have a local technical person that is available, try them.
  5675. Some regional offices have a hotline that you can call for
  5676. assistance. 
  5677.  
  5678.  
  5679.  
  5680. 9.5  CCS Hotline
  5681.  
  5682.  
  5683. The is a technical Hotline service available in the Denver
  5684. office.  This service is available to the entire Bureau.  This is
  5685. the fastest way to get your questions answered.  The Hotline
  5686. number is (FTS) 776-HOTT (4688) or Commercial (303) 236-HOTT
  5687. (4688).
  5688. 9.6  CBT (DOS based training for UNIX)
  5689.  
  5690.  
  5691. There is a Computer Based Training course available on a PC in
  5692. the Denver training room.  It runs under DOS and doesn't need to
  5693. be connected to a UNIX machine.  It is easy to use and has
  5694. lessons for the beginning and advanced UNIX user, as well as
  5695. courses in C programming and UNIX system administration.  It can
  5696. also give you instruction about a particular command or topic
  5697. that interests you.
  5698. Workshop 9
  5699.  
  5700.  
  5701. Lucky you! No workshop
  5702.  
  5703.  
  5704.  
  5705. Please complete the...
  5706.  
  5707.                                       Summary Workshop 
  5708.  
  5709.                                              and
  5710.  
  5711.                                       Course Evaluation
  5712.                                             NOTES
  5713. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5714. APPENDIX A:  DENVER OFFICE LOGIN SEQUENCE
  5715.  
  5716.  
  5717.        PRESS Space Bar
  5718.                                                                  
  5719. ┌───────────────────────────────────────────────────────────────┐
  5720. │ WELCOME TO THE B.O.R. NETWORK P/S:B                           │
  5721. │ SYSTEMS PRESENTLY AVAILABLE ARE:                              │
  5722. │                                                               │
  5723. │  **SYSTEM**          **NAME**                                 │
  5724. │                                                               │
  5725. │ VAX 8300'S            VAX                                     │
  5726. │ CYBER/CDCNET F.E.     CDC                                     │
  5727. │ ENCORE/UNIX           MAX                                     │
  5728. │ OUT DIAL              OD                                      │
  5729. │                                                               │
  5730. │ TO SELECT A SYSTEM, ENTER THE SYSTEM                          │
  5731. │ NAME AND CARRIAGE RETURN AT NEXT                              │
  5732. │ PROMPT.                                                       │
  5733. │                                                               │
  5734. │ CHANNEL 04/010. ENTER RESOURCE MAX                            │
  5735. │ CONNECTED TO 04/052                                           │
  5736. └───────────────────────────────────────────────────────────────┘
  5737.  
  5738.  
  5739.        Wait 2 seconds then PRESS (Ret) TWICE
  5740.  
  5741. ┌────────────────────────────────────────────────────────────────────────────────┐
  5742. │                                                                                │
  5743. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  5744. │                                                                                │
  5745. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  5746. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  5747. │ annex: c domax1                                                                │
  5748. │ login: your username(Ret)                                                      │
  5749. │ Password: your password(Ret)                                                   │
  5750. │ UNIX System V Release ax.2.2o ns32332                                          │
  5751. │ domax1                                                                         │
  5752. │ Copyright (c) 1984 AT&T                                                        │
  5753. │ All Rights Reserved                                                            │
  5754. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  5755. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  5756. └────────────────────────────────────────────────────────────────────────────────┘
  5757.  
  5758.                                             NOTES
  5759. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  5760. APPENDIX B:  GREAT PLAINS LOGIN SEQUENCE
  5761.  
  5762.  
  5763.        PRESS (Ret)
  5764.  
  5765. ┌────────────────────────────────────────────────────────────────────────────┐
  5766. │ WARNING ****** WARNING ****** WARNING ****** WARNING ****** WARNING        │
  5767. │ PUBLIC LAW 99-474 PROHIBITS UNAUTHORIZED USE OF THIS U.S. GOVERNMENT       │
  5768. │ COMPUTER SYSTEM AND/OR SOFTWARE.  PUNISHMENT INCLUDES FINES AND UP TO      │
  5769. │ 10 YEARS IN PRISON.  REPORT VIOLATIONS TO THE SYSTEM SECURITY OFFICER.     │
  5770. │ WARNING ****** WARNING ****** WARNING ****** WARNING ****** WARNING        │
  5771. │                                                                            │
  5772. │                                                                            │
  5773. │ ENTER RESOURCE  A - BIL640, B - BIL751, OA - BIL630, DEN - DENVER CYBERS   │
  5774. │ FOR STATUS OF COMPUTER SYSTEMS CALL   (406) 657-6828 OR FTS 585-6828       │
  5775. │ FOR EMERGENCY AND AFTER HOURS CALL    (406) 255-6932                       │
  5776. │                                                                            │
  5777. │ CHANNEL 02/035.  ENTER RESOURCE DEN(Ret)                                   │
  5778. │ CONNECTED TO 02/079                                                        │
  5779. │                                                                            │
  5780. │ WELCOME TO THE B.O.R. NETWORK P/S:B                                        │
  5781. │ SYSTEMS PRESENTLY AVAILABLE ARE:                                           │
  5782. │                                                                            │
  5783. │  **SYSTEM**          **NAME**                                              │
  5784. │                                                                            │
  5785. │  VAX 8300'S           VAX                                                  │
  5786. │  CYBER/CDCNET F.E.    CDC                                                  │
  5787. │  CENTER               ASC                                                  │
  5788. │  ENCORE/UNIX          MAX                                                  │
  5789. │  TO SELECT A SYSTEM, ENTER THE SYSTEM                                      │
  5790. │  CARRIAGE RETURN AT NEXT                                                   │
  5791. │  PROMPT.                                                                   │
  5792. │                                                                            │
  5793. │  CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                                   │
  5794. │  CONNECTED TO 06/025                                                       │
  5795. └────────────────────────────────────────────────────────────────────────────┘
  5796.  
  5797.        PRESS (RET) TWICE
  5798.  
  5799. ┌────────────────────────────────────────────────────────────────────────────────┐
  5800. │                                                                                │
  5801. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  5802. │                                                                                │
  5803. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  5804. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  5805. │ annex: c domax1                                                                │
  5806. │ login: your username(Ret)                                                      │
  5807. │ Password: your password(Ret)                                                   │
  5808. │ UNIX System V Release ax.2.2o ns32332                                          │
  5809. │ domax1                                                                         │
  5810. │ Copyright (c) 1984 AT&T                                                        │
  5811. │ All Rights Reserved                                                            │
  5812. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  5813. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  5814. └────────────────────────────────────────────────────────────────────────────────┘
  5815.  
  5816. APPENDIX C:  LOWER COLORADO LOGIN SEQUENCE
  5817.  
  5818.  
  5819. The following operating procedures show how a user gets to Denver
  5820. using the Local Area Network (LAN) in Boulder City, starting with
  5821. the PC prompt:   M:\USERNAME>
  5822.  
  5823.  
  5824.        ENTER PCPLUS(Ret)
  5825.  
  5826. ┌────────────────────────────────────────────────────────────────┐         
  5827. │                        |                                       │      
  5828. │ COMMUNICATION SERVICES |     PROCOMM PLUS ADD SERVICES MENU    │      
  5829. │     ON NETWORK         |                                       │      
  5830. │                        |                                       │      
  5831. │ GENERAL SPECIFIC SERVER| UP/DOWN ARROW ..Highlight Services    │      
  5832. │________________________|                                       │      
  5833. │ MICOM      *       *   | ENTER ....Connect Highlighted Services│      
  5834. │ VAX_19.2   *       *   |                                       │      
  5835. │ MI24       *       *   | PgPd .....Scroll Up One Page          │      
  5836. │ ADMICOM    *       *   |                                       │      
  5837. │                        | PgPn .....Scroll Down One Page        │      
  5838. │                        |                                       │      
  5839. │                        | Home .....First Service               │      
  5840. │                        |                                       │      
  5841. │                        | End ......Last Service                │      
  5842. │                        |                                       │ 
  5843. │                        | Alt-E ....Expand/Contract Services    │ 
  5844. │                        |                                       │ 
  5845. │                        | Alt-M ....Manual Connect              │ 
  5846. │                        |                                       │ 
  5847. │                        | Alt-X ....Exit PROCOMM PLUS           │ 
  5848. │                        |                                       │ 
  5849. │                        | Alt-Z ....Help                        │ 
  5850. └────────────────────────────────────────────────────────────────┘ 
  5851.  
  5852.  
  5853.        SELECT MICOM.  PRESS (Ret) SEVERAL TIMES 
  5854.  
  5855. ┌───────────────────────────────────────────────────────────────┐
  5856. │   THIS IS THE LOWER COLORADO REGIONAL OFFICE INSTANET 6600    │
  5857. │   RESOURCES AVAILABLE                                         │
  5858. │   BLD460                                                      │
  5859. │   BLD732                                                      │
  5860. │   BLDT50                                                      │
  5861. │   DEN   (1200BPS)                                             │
  5862. │   DEN2  (2400BPS)                                             │
  5863. │   OUTDIAL (1200 BPS)                                          │
  5864. │   TELEBIT (1400 BPS OUTDIAL)                                  │
  5865. │   VAX  (19.2 lines only)                                      │
  5866. │   CHANNEL 02/008. ENTER RESOURCE                              │
  5867. └───────────────────────────────────────────────────────────────┘
  5868.  
  5869.        ENTER DEN(Ret)
  5870.  
  5871. ┌───────────────────────────────────────────────────────────────┐
  5872. │ You are accessing the Denver MICOM through the Boulder City   │
  5873. │ MICOM.  Please remember to hit the break key three times      │
  5874. │ after logging off.  The first DISCONNECTED comes from.  The   │
  5875. │ second DISCONNECTED comes from Boulder City.  This will assure│
  5876. │ that other users can connect when you are finished.           │
  5877. └───────────────────────────────────────────────────────────────┘
  5878.  
  5879.  
  5880.        PRESS (Ret) SEVERAL TIMES 
  5881.                                                                  
  5882. ┌───────────────────────────────────────────────────────────────┐
  5883. │   **SYSTEM**                  **NAME**                        │
  5884. │                                                               │
  5885. │   VAX 8300'S                   VAX                            │
  5886. │   CYBER/CDCNET F.E.            CDC                            │
  5887. │   ASC/CORP. CENTER             ASC                            │
  5888. │   ENCORE/UNIX                  MAX                            │
  5889. │                                                               │
  5890. │   TO SELECT A SYSTEM, ENTER THE SYSTEM                        │
  5891. │   NAME AND CARRIAGE RETURN AT NEXT                            │
  5892. │   PROMPT.                                                     │
  5893. │                                                               │
  5894. │   CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                     │
  5895. │   CONNECTED TO 06/025                                         │
  5896. └───────────────────────────────────────────────────────────────┘
  5897.  
  5898.  
  5899.        PRESS (Ret) TWICE
  5900.  
  5901. ┌────────────────────────────────────────────────────────────────────────────────┐
  5902. │                                                                                │
  5903. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  5904. │                                                                                │
  5905. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  5906. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  5907. │ annex: c domax1                                                                │
  5908. │ login: your username(Ret)                                                      │
  5909. │ Password: your password(Ret)                                                   │
  5910. │ UNIX System V Release ax.2.2o ns32332                                          │
  5911. │ domax1                                                                         │
  5912. │ Copyright (c) 1984 AT&T                                                        │
  5913. │ All Rights Reserved                                                            │
  5914. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  5915. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  5916. └────────────────────────────────────────────────────────────────────────────────┘
  5917.  
  5918. APPENDIX D:  MID-PACIFIC LOGIN SEQUENCE
  5919.  
  5920.  
  5921. NETWORK LOGIN PROCEDURE
  5922.  
  5923.  
  5924.        TYPE PCOMN(Ret)
  5925.  
  5926. ┌───────────────────────────────────────────────────────────────┐
  5927. │         ┌─────────────────────────────────────────┐           │
  5928. │ ┌───────┤                 Sacramento Connect Menu         ├─────────┐ │
  5929. │ │       └─────────────────────────────────────────┘         │ │
  5930. │ │                                                           │ │
  5931. │ │                                                           │ │
  5932. │ │       1)  Connect to the Sacramento VAX 8300 (USR)        │ │
  5933. │ │                                                           │ │
  5934. │ │       2)  Connect to the Sacramento VAX 780 (CVOCO)       │ │
  5935. │ │                                                           │ │
  5936. │ │       3)  Connect to the Sacramento ENCORE                │ │
  5937. │ │                                                           │ │
  5938. │ │       4)  Connect to the Sacramento (TCP/IP) NETWORK      │ │
  5939. │ │                                                           │ │
  5940. │ │       5)  Manual Setup/Connections                        │ │
  5941. │ │                                                           │ │
  5942. │ │       D)  Connect to the DENVER Computers                 │ │
  5943. │ │                                                           │ │
  5944. │ │       E)  EXIT to DOS                                     │ │
  5945. │ └───────────────────────────────────────────────────────────┘ │
  5946. └───────────────────────────────────────────────────────────────┘
  5947.  
  5948.  
  5949.        PRESS D(Ret)
  5950.  
  5951. ┌───────────────────────────────────────────────────────────────┐
  5952. │         ┌─────────────────────────────────────────┐           │
  5953. │ ┌───────┤                    Denver Connect Menu          ├─────────┐ │
  5954. │ │       └─────────────────────────────────────────┘         │ │
  5955. │ │                                                           │ │
  5956. │ │                                                           │ │
  5957. │ │       1)  Connect to the Denver VAX 8300 (USR)            │ │
  5958. │ │                                                           │ │
  5959. │ │       2)  Connect to the Denver CYBER AA & EE             │ │
  5960. │ │                                                           │ │
  5961. │ │       3)  Connect to the Denver ENCORE                    │ │
  5962. │ │                                                           │ │
  5963. │ │       4)  Connect to the Denver IBM (FFS)                 │ │
  5964. │ │                                                           │ │
  5965. │ │       5)  Connect to Sacramento Computers                 │ │
  5966. │ │                                                           │ │
  5967. │ │       E)  EXIT to DOS                                     │ │
  5968. │ └───────────────────────────────────────────────────────────┘ │
  5969. └───────────────────────────────────────────────────────────────┘
  5970.        PRESS 3(Ret)
  5971.  
  5972. ┌────────────────────────────────────────────────────────────────────────────┐
  5973. │ hosts                                                                      │
  5974. │    Host Name                System Status  Load Factor    Inet Addr        │
  5975. │    ====================================================================    │
  5976. │    domax0                   up             0.46           137.77.1.2       │
  5977. │    domax1                   up             1.23           137.77.1.3       │
  5978. │    dosun0                   up             1.28           137.77.1.5       │
  5979. │    erc830                   up             0.36           137.77.1.4       │
  5980. │ annex: c domax0                                                            │
  5981. │ login: your username(Ret)                                                  │
  5982. │ Password: your password(Ret)                                               │
  5983. │ UNIX System V Release ax.2.2j ns32332                                      │
  5984. │ domax0                                                                     │
  5985. │ Copyright (c) 1984 AT&T                                                    │
  5986. │ All Rights Reserved                                                        │
  5987. │  ***WARNING***Unauthorized access to/use of this U.S. Government           │
  5988. │           computer is punishable by fine and/or imprisonment. ***WARNING***│
  5989. │                                                                            │
  5990. └────────────────────────────────────────────────────────────────────────────┘
  5991.  
  5992. DEDICATED LINE LOGIN
  5993.  
  5994.  
  5995.        TYPE PCOM(Ret)
  5996.  
  5997.  
  5998.        PRESS (Ret)
  5999.  
  6000. ┌───────────────────────────────────────────────────────────────┐
  6001. │   NAME OF RESOURCE:  DEN(Ret)                                 │
  6002. │                                                               │
  6003. │   **SYSTEM**                  **NAME**                        │
  6004. │                                                               │
  6005. │   VAX 8300'S                   VAX                            │
  6006. │   CYBER/CDCNET F.E.            CDC                            │
  6007. │   ASC/CORP. CENTER             ASC                            │
  6008. │   ENCORE/UNIX                  MAX                            │
  6009. │                                                               │
  6010. │   TO SELECT A SYSTEM, ENTER THE SYSTEM                        │
  6011. │   NAME AND CARRIAGE RETURN AT NEXT                            │
  6012. │   PROMPT.                                                     │
  6013. │                                                               │
  6014. │   CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                     │
  6015. │   CONNECTED TO 06/025                                         │
  6016. └───────────────────────────────────────────────────────────────┘
  6017.  
  6018.  
  6019.        PRESS (Ret) TWICE
  6020.  
  6021. ┌────────────────────────────────────────────────────────────────────────────────┐
  6022. │                                                                                │
  6023. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6024. │                                                                                │
  6025. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6026. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6027. │ annex: c domax1                                                                │
  6028. │ login: your username(Ret)                                                      │
  6029. │ Password: your password(Ret)                                                   │
  6030. │ UNIX System V Release ax.2.2o ns32332                                          │
  6031. │ domax1                                                                         │
  6032. │ Copyright (c) 1984 AT&T                                                        │
  6033. │ All Rights Reserved                                                            │
  6034. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6035. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6036. └────────────────────────────────────────────────────────────────────────────────┘
  6037.  
  6038.                                             NOTES
  6039. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  6040. APPENDIX E:  PACIFIC NORTHWEST LOGIN SEQUENCE
  6041.  
  6042.  
  6043.        PRESS (Ret) OR Space Bar
  6044.  
  6045. ┌────────────────────────────────────────────────────────────────────────────┐
  6046. │  *******************************  NOTICE  *******************************  │
  6047. │  USE OF GOVERNMENT  COMPUTER RESOURCES AND DATA IS RESTRICTED TO OFFICIAL  │
  6048. │  GOVERNMENT BUSINESS.  FAILURE TO COMPLY COULD RESULT IN DISCIPLINARY      │
  6049. │  ACTION OR PROSECUTION UNDER FEDERAL LAW.  REPORT UNAUTHORIZED USE OR      │
  6050. │  ACCESS TO THE ADP SECURITY OFFICER AT (208)334-1746 OR (FTS)554-1746.     │
  6051. │                                                                            │
  6052. │  C  =  CYBER                                                               │
  6053. │  H  =  HYDROMET                                                            │
  6054. │  P  =  OUT DIAL                                                            │
  6055. │  V  =  VAX BOISE                                                           │
  6056. │  Y  =  YAKIMA VAX                                                          │
  6057. │                                                                            │
  6058. │  CHANNEL 02/014. ENTER RESOURCE:  C(Ret)                                   │
  6059. │  CONNECTED TO CHANNEL 03/094                                               │
  6060. └────────────────────────────────────────────────────────────────────────────┘
  6061.  
  6062.  
  6063.        PRESS (Ret) TWO OR THREE TIMES 
  6064.  
  6065. ┌───────────────────────────────────────────────────────────────┐
  6066. │    **SYSTEM**                  **NAME**                       │
  6067. │                                                               │
  6068. │    VAX 8300'S                   VAX                           │
  6069. │    CYBER/CDCNET F.E.            CDC                           │
  6070. │    ASC/CORP. CENTER             ASC                           │
  6071. │    ENCORE/UNIX                  MAX                           │
  6072. │                                                               │
  6073. │    TO SELECT A SYSTEM, ENTER THE SYSTEM                       │
  6074. │    NAME AND CARRIAGE RETURN AT NEXT                           │
  6075. │    PROMPT.                                                    │
  6076. │                                                               │
  6077. │    CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                    │
  6078. │    CONNECTED TO 06/025                                        │
  6079. └───────────────────────────────────────────────────────────────┘
  6080.        PRESS (Ret) TWICE
  6081.  
  6082. ┌────────────────────────────────────────────────────────────────────────────────┐
  6083. │                                                                                │
  6084. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6085. │                                                                                │
  6086. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6087. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6088. │ annex: c domax1                                                                │
  6089. │ login: your username(Ret)                                                      │
  6090. │ Password: your password(Ret)                                                   │
  6091. │ UNIX System V Release ax.2.2o ns32332                                          │
  6092. │ domax1                                                                         │
  6093. │ Copyright (c) 1984 AT&T                                                        │
  6094. │ All Rights Reserved                                                            │
  6095. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6096. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6097. └────────────────────────────────────────────────────────────────────────────────┘
  6098.  
  6099. APPENDIX F:  UPPER COLORADO LOGIN SEQUENCE
  6100.  
  6101.  
  6102.        PRESS (Ret)
  6103.  
  6104. ┌───────────────────────────────────────────────────────────────┐
  6105. │    Server>  C MICOM2400(Ret)                                  │
  6106. │    Server -010- Session 1 connected.                          │
  6107. └───────────────────────────────────────────────────────────────┘
  6108.  
  6109.  
  6110.        PRESS (Ret)
  6111.  
  6112. ┌───────────────────────────────────────────────────────────────┐
  6113. │    SLC PORT SELECTOR                                          │
  6114. │    CHANNEL 01/091.  ENTER HOST:   DEN(Ret)                    │
  6115. │    CONNECTED TO 01/014.                                       │
  6116. └───────────────────────────────────────────────────────────────┘
  6117.  
  6118.  
  6119.        PRESS (Ret) TWO OR THREE TIMES
  6120.                                                                  
  6121. ┌───────────────────────────────────────────────────────────────┐
  6122. │    **SYSTEM**                  **NAME**                       │
  6123. │                                                               │
  6124. │    VAX 8300'S                   VAX                           │
  6125. │    CYBER/CDCNET F.E.            CDC                           │
  6126. │    ASC/CORP. CENTER             ASC                           │
  6127. │    ENCORE/UNIX                  MAX                           │
  6128. │                                                               │
  6129. │    TO SELECT A SYSTEM, ENTER THE SYSTEM                       │
  6130. │    NAME AND CARRIAGE RETURN AT NEXT                           │
  6131. │    PROMPT.                                                    │
  6132. │                                                               │
  6133. │    CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                    │
  6134. │    CONNECTED TO 06/025                                        │
  6135. └───────────────────────────────────────────────────────────────┘
  6136.        PRESS (Ret) TWICE
  6137.  
  6138. ┌────────────────────────────────────────────────────────────────────────────────┐
  6139. │                                                                                │
  6140. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6141. │                                                                                │
  6142. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6143. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6144. │ annex: c domax1                                                                │
  6145. │ login: your username(Ret)                                                      │
  6146. │ Password: your password(Ret)                                                   │
  6147. │ UNIX System V Release ax.2.2o ns32332                                          │
  6148. │ domax1                                                                         │
  6149. │ Copyright (c) 1984 AT&T                                                        │
  6150. │ All Rights Reserved                                                            │
  6151. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6152. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6153. └────────────────────────────────────────────────────────────────────────────────┘
  6154.  
  6155. APPENDIX G:  WASHINGTON OFFICE LOGIN SEQUENCE
  6156.  
  6157.  
  6158.        PRESS Space Bar ONCE OR TWICE 
  6159.  
  6160. ┌───────────────────────────────────────────────────────────────┐
  6161. │    CONNECTED TO 01/044                                        │
  6162. │    WELCOME TO THE B.O.R. NETWORK P/S:C                        │
  6163. │    SYSTEMS PRESENTLY AVAILABLE ARE:                           │
  6164. │                                                               │
  6165. │    **SYSTEM**           **NAME**                              │
  6166. │                                                               │
  6167. │    CYBER SYSTEMS                                              │
  6168. │     (AA OR EE)                                                │
  6169. │    VAX CLUSTER           DEN                                  │
  6170. │                                                               │
  6171. │    OUT-DIAL MODEM        OD                                   │
  6172. │                                                               │
  6173. │    TO SELECT A SYSTEM,ENTER THE SYSTEM                        │
  6174. │    NAME AND CARRIAGE-RETURN AT NEXT                           │
  6175. │    PROMPT.                                                    │
  6176. │                                                               │
  6177. │    CHANNEL 02/026. ENTER RESOURCE  DEN(Ret)                   │
  6178. │    CONNECTED TO 01/051                                        │
  6179. │                                                               │
  6180. │    **SYSTEM**                  **NAME**                       │
  6181. │                                                               │
  6182. │    VAX 8300'S                   VAX                           │
  6183. │    CYBER/CDCNET F.E.            CDC                           │
  6184. │    ASC/CORP. CENTER             ASC                           │
  6185. │    ENCORE/UNIX                  MAX                           │
  6186. │                                                               │
  6187. │    TO SELECT A SYSTEM, ENTER THE SYSTEM                       │
  6188. │    NAME AND CARRIAGE RETURN AT NEXT                           │
  6189. │    PROMPT.                                                    │
  6190. │                                                               │
  6191. │    CHANNEL 02/079. ENTER RESOURCE MAX(Ret)                    │
  6192. │    CONNECTED TO 06/025                                        │
  6193. └───────────────────────────────────────────────────────────────┘
  6194.        PRESS (Ret) TWICE
  6195.  
  6196. ┌────────────────────────────────────────────────────────────────────────────────┐
  6197. │                                                                                │
  6198. │ Annex Command Line Interpreter   *   Copyright 1988 Xylogics, Inc.             │
  6199. │                                                                                │
  6200. │  ***WARNING***Unauthorized access to U.S. Government computers                 │
  6201. │                is punishable by fine and/or imprisonment. ***WARNING***        │
  6202. │ annex: c domax1                                                                │
  6203. │ login: your username(Ret)                                                      │
  6204. │ Password: your password(Ret)                                                   │
  6205. │ UNIX System V Release ax.2.2o ns32332                                          │
  6206. │ domax1                                                                         │
  6207. │ Copyright (c) 1984 AT&T                                                        │
  6208. │ All Rights Reserved                                                            │
  6209. │  ***WARNING***Unauthorized access to/use of this U.S. Government               │
  6210. │               computer is punishable by fine and/or imprisonment. ***WARNING***│
  6211. └────────────────────────────────────────────────────────────────────────────────┘
  6212.  
  6213. APPENDIX H:  UNIX COMMANDS QUICK REFERENCE
  6214.  
  6215.  
  6216.  
  6217. a > b                                     put the output of command a into
  6218.                                           file b
  6219.  
  6220. a >> b                                    append the output of command a onto
  6221.                                           file b
  6222.  
  6223. a < b                                     take the input of command a from
  6224.                                           file b
  6225.  
  6226. a | c                                     pipe the output of command a to the 
  6227.                                           input of command c
  6228.  
  6229. a &                                       run command a in the background
  6230.  
  6231. assist                                    call up the assist menu for
  6232.                                           information on UMAX commands
  6233.  
  6234. at time < script                          run script at time
  6235.  
  6236. at -l                                     list your at jobs waiting to be
  6237.                                           executed
  6238.  
  6239. at -r xx                                  remove at job xx
  6240.  
  6241. awk '/str1/,/str2/' file                  display all lines between those    
  6242.                                           containing str1 and str2
  6243.  
  6244. awk '{print $n,$m}' file                  display fields n and m of file
  6245.  
  6246. call host                                 connect to a Multimax from an Annex
  6247.  
  6248. cat file                                  display file on the screen
  6249.  
  6250. cat file1 >> file2                        append file1 onto file2
  6251.  
  6252. cd                                        return to your home directory
  6253.  
  6254. cd dir                                    work in directory dir
  6255.  
  6256. chmod perms file                          change permissions on file to perms
  6257.  
  6258. cp file1 file2                            copy file1 to file2
  6259.  
  6260. cp f1 f2 f3 dir                           copy files f1, f2, and f3 into
  6261.                                           directory dir
  6262.  
  6263. csh                                       the C shell
  6264.  
  6265.  
  6266. cu options host                           dial up a remote host
  6267.  
  6268. cut -fx file                              display field x of file
  6269.  
  6270. cut -da -fx file                          use a as a field separator
  6271.  
  6272. diff file 1 file 2                        display differences between file1
  6273.                                           and file2
  6274.  
  6275. echo string                               display string on the terminal
  6276.  
  6277. file file1                                describe file1's type (data, text,
  6278.                                           binary, etc)
  6279.  
  6280. finger user                               display information on user
  6281.  
  6282. ftp                                       interactive remote file transfer
  6283.  
  6284. grep string file                          search for string in file
  6285.  
  6286. grep -c string file                       display only the number of
  6287.                                           occurrences of string
  6288.  
  6289. grep -l string files                      list file names that contain string
  6290.  
  6291. kill %x                                   kill background job x
  6292.  
  6293. ksh                                       the KornShell
  6294.  
  6295. lp -ddest file                            Print file on the printer dest
  6296.  
  6297. ls                                        list the files in the current
  6298.                                           working directory
  6299.  
  6300. ls dir                                    list the files in directory dir
  6301.  
  6302. ls -a                                     include files that begin with a 
  6303.                                           . (period)
  6304.  
  6305. ls -l                                     long listing including permissions, 
  6306.                                           size and ownership
  6307.  
  6308. ls -C                                     list in columns
  6309.  
  6310. ls -ld                                    display detailed information on a
  6311.                                           directory, not its contents
  6312.  
  6313. mailx                                     read mail via interactive mail
  6314.                                           program
  6315.  
  6316. mailx user                                send mail to user
  6317.  
  6318.  
  6319. man command                               display the man pages for command
  6320.  
  6321. mkdir dir                                 create directory dir
  6322.  
  6323. mv file1 file2                            move file1 to file2
  6324.  
  6325. mv f1 f2 f3 dir                           move files f1, f2, and f3 into
  6326.                                           directory dir
  6327.  
  6328. nsh host commands                         execute commands on a remote host
  6329.  
  6330. passwd                                    change your password
  6331.  
  6332. pg file                                   display file on screen at a time
  6333.  
  6334. ps                                        display process status of your
  6335.                                           current session
  6336.  
  6337. ps -u user                                display process for user
  6338.  
  6339. pwd                                       print (current) working directory
  6340.                                                  
  6341. rcp host1:file host2:file                 copy files from one host to another
  6342.  
  6343. rlogin host                               login to a remote host
  6344.  
  6345. rm file                                   remove file
  6346.  
  6347. rm -rdir                                  remove directory dir and contents
  6348.  
  6349. rmdir dir                                 remove directory dir
  6350.  
  6351. ruptime                                   display status of hosts on the
  6352.                                           network
  6353.  
  6354. rwho                                      display information on network
  6355.                                           users
  6356.  
  6357. sed -e "action" file                      use stream editor on file
  6358.  
  6359. sh                                        Bourne shell
  6360.  
  6361. shl                                       the Shell Layer Manager
  6362.  
  6363. sort file                                 perform an alphabetic sort based on
  6364.                                           the first field of file
  6365.  
  6366. sort -n file                              perform a numeric sort based on the
  6367.                                           first field of file
  6368.  
  6369. sort +x file                              sort on field x+1
  6370.  
  6371.  
  6372. sort -ta file                             use a as a field separator
  6373.  
  6374. spell file                                check file for correct spelling
  6375.  
  6376. stty                                      display current stty settings
  6377.  
  6378. stty intr                                 set interrupt character to 
  6379.  
  6380. stty kill                                 set kill character to 
  6381.  
  6382. talk                                      talk with user on your terminal
  6383.  
  6384. talk file                                 display the last 10 lines of file
  6385.  
  6386. telenet host                              connect to a remote host
  6387.  
  6388. telenet annex                             connect to an Annex for use of an
  6389.                                           outbound port
  6390.  
  6391. tr a b file                               in file, change every a to b
  6392.  
  6393. vi file                                   edit file with a full screen editor
  6394.  
  6395. wc file                                   list the number of lines, words and
  6396.                                           characters in file
  6397.  
  6398. write user                                send a message to user's terminal
  6399.  
  6400. uucp file hostpath                        remote copy
  6401. APPENDIX I:  vi COMMANDS QUICK REFERENCE
  6402.  
  6403. Special Commands
  6404.  
  6405. Esc                  return to command mode
  6406.  u                   undo last command
  6407.  .                   repeat last insert, delete or put command
  6408.  
  6409. Saving Text and Quitting
  6410.  
  6411. :w                   write (save) text
  6412. :w newfile           save text to file newfile
  6413. :x,yw newfile        save lines x to y into newfile
  6414. :q!                  quit without saving changes
  6415. :wq                  save text and quit
  6416.  
  6417. Cursor Positioning
  6418.  
  6419. N                    move to line N
  6420. N+                   down N lines
  6421. N-                   up N lines
  6422. ^D                   down one screen
  6423. ^U                   up one screen
  6424. k                    up one line
  6425. j                    down one line
  6426. ^                    beginning of line
  6427. $                    end of line
  6428. Nw                   N words ahead
  6429. Nb                   back N words
  6430. w                    word ahead
  6431. b                    back one word
  6432. e                    end of word
  6433. h                    backspace
  6434. l                    forward one space
  6435. arrow keys           space left or right, go up or down one line
  6436.  
  6437.  
  6438. Searches
  6439.  
  6440. /pattern             search forward for pattern
  6441. ?pattern             search backward for pattern
  6442.  ? or /              repeat the last search
  6443.  
  6444. Deleting Text
  6445.  
  6446. Ndd                  delete N lines
  6447. dd                   delete current line
  6448. D                    delete remainder of line
  6449. Ndw                  delete N words
  6450. dw                   delete current word
  6451. Nx                   delete N characters
  6452. x                    delete one character
  6453.  
  6454. Copying Text
  6455.  
  6456. NY                   yank N lines
  6457. Y                    yank one line
  6458. Nyw                  yank N words
  6459. yw                   yank one word
  6460.  
  6461. P                    put yanked lines above current cursor position, or
  6462.                      put yanked words before current cursor position
  6463.  
  6464. p                    put yanked lines below current cursor position, or
  6465.                      put yanked words after current cursor position
  6466.  
  6467. Entering Text Mode
  6468.  
  6469. I                    enter text mode, additional text appears at the
  6470.                      beginning of the current line
  6471.  
  6472. i                    enter text mode, additional text appears before
  6473.                      the current cursor position
  6474.  
  6475. A                    enter text mode, additional text appears at the
  6476.                      end of the current line
  6477.  
  6478. a                    enter text mode, additional text appears after the
  6479.                      current cursor position.
  6480.  
  6481. O                    enter text mode, open a line above the current
  6482.                      line
  6483.  
  6484. o                    enter text mode, open a line below the current
  6485.                      line
  6486.  
  6487. Replacing and Substituting Text
  6488.  
  6489. r                    replace one character at current cursor position,
  6490.                      then return to command mode
  6491.  
  6492. R                    replace characters until Esc
  6493.  
  6494. s                    substitute characters for the current character
  6495.                      until Esc
  6496.  
  6497. Ns                   substitute characters for the current N characters
  6498.                      until Esc
  6499. Reading in Text
  6500.  
  6501. :r filename          append the contents of filename below the current
  6502.                      cursor position
  6503.  
  6504. :r !shell-cmd        append the output of shell-cmd below the current
  6505.                      cursor position
  6506.  
  6507. Global Operations
  6508.  
  6509. :x,ys/old/new/g
  6510.                      on lines x through y, change old to new
  6511.  
  6512. :x,yg/pattern/d
  6513.                      delete any line from x toy that has the string
  6514.                      pattern 
  6515.                                             NOTES
  6516. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  6517. APPENDIX J:  vi COMMANDS REFERENCE
  6518.  
  6519.  
  6520. NAME
  6521.      vi - screen-oriented (visual) display editor based on ex
  6522.  
  6523. SYNOPSIS
  6524.      vi [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [ -C
  6525.      ] [ -ccommand ] file ...
  6526.      view [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [
  6527.      -C ] [ -ccommand ] file ...
  6528.      vedit [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [
  6529.      -C ] [ -ccommand ] file ...
  6530.  
  6531. DESCRIPTION
  6532.      vi (visual) is a display-oriented text editor based on an
  6533.      underlying line editor ex(1).  It is possible to use the
  6534.      command mode of ex from within vi and vice-versa. The visual
  6535.      commands are described on this manual page; how to set
  6536.      options (like automatically numbering lines and
  6537.      automatically starting a new output line after a carriage
  6538.      return) and all ex(1) line editor commands are described on
  6539.      the ex(1) manual page.
  6540.  
  6541.      When using vi, changes made to the file are reflected in
  6542.      what is displayed on the terminal screen.  The position of
  6543.      the cursor on the screen indicates the position within the
  6544.      file.
  6545.  
  6546. INVOCATION
  6547.      The following invocation options are interpreted by vi:
  6548.  
  6549.      -t tag  Edit the file containing the tag and position the
  6550.              cursor at its definition.  The file (tags)
  6551.              containing the tag is found in the current directory
  6552.              or in /usr/lib/tags.  Below is an example of a tags
  6553.              file:
  6554.  
  6555.                     line /tmp/vi.file   /line/
  6556.                     this /tmp/vi.file   /this/
  6557.  
  6558.              Using "vi -t line", the edited file will be
  6559.              "/tmp/vi.file". The file will be searched for the
  6560.              first occurrence of "line", and the cursor will be
  6561.              placed at "line".
  6562.  
  6563.      -r file Edit file after an editor or system crash.
  6564.              (Recovers the version of file that was in the buffer
  6565.              when the crash occurred.)
  6566.  
  6567.      -L      List the name of all files saved as the result of an
  6568.              editor or system crash.
  6569.  
  6570.      -wn     Set the default window size to n.  This is useful
  6571.              when using the editor over a slow speed line.
  6572.  
  6573.      -R      Readonly mode; the readonly flag is set, preventing
  6574.              accidental overwriting of the file.
  6575.  
  6576.      -x      Encryption option; when used, vi simulates the X
  6577.              command of ex(1) and prompts the user for a key.
  6578.              This key is used to encrypt and decrypt text using
  6579.              the algorithm of crypt(1).  The X command makes an
  6580.              educated guess to determine whether or not text read
  6581.              in is encrypted.  The temporary buffer file is
  6582.              encrypted also, using a transformed version of the
  6583.              key typed in for the -x option.  See crypt(1).
  6584.              Also, see the WARNING section at the end of this
  6585.              manual page.
  6586.  
  6587.      -C      Encryption option, same as the -x option, except
  6588.              that vi simulates the C command of ex(1).  The C
  6589.              command is like the X command of ex(1), except that
  6590.              all text read in is assumed to have been encrypted.
  6591.  
  6592.      -c      command Begin editing by executing the specified
  6593.              editor command (usually a search or positioning
  6594.              command).
  6595.  
  6596.      The file argument indicates one or more files to be edited.
  6597.  
  6598.      The view invocation is the same as vi except that the
  6599.      readonly flag is set.
  6600.  
  6601.      The vedit invocation is intended for beginners.  It is the
  6602.      same as vi except that the report flag is set to 1, the
  6603.      showmode and novice flags are set, and magic is turned off.
  6604.      These defaults make it easier to learn vi.
  6605.  
  6606. VI MODES
  6607.      Command  Normal and initial mode.  Other modes return to
  6608.      command mode upon completion.  ESC (escape) is used
  6609.      to cancel a partial command.
  6610.  
  6611.      Input    Entered by setting the following options: a i A I o
  6612.               O c s R.  Arbitrary text may then be entered.
  6613.               Input mode is normally terminated with ESC
  6614.               character, or abnormally with interrupt.
  6615.  
  6616.      Last line
  6617.               Reading input for : / ? or !; terminate with  CR to
  6618.               execute, interrupt to cancel.
  6619. COMMAND SUMMARY
  6620.      In the descriptions, CR stands for carriage return and ESC
  6621.      stands for the escape key.
  6622.  
  6623.    Sample Commands
  6624.  
  6625.      <- | | ->           arrow keys move the cursor
  6626.      h j k l             same as arrow keys
  6627.      itextESC            insert text
  6628.      cwnewESC            change word to new
  6629.      easESC              pluralize word (end of word; append s;
  6630.                          escape from input state)
  6631.      x                   delete a character
  6632.      dw                  delete a word
  6633.      dd                  delete a line
  6634.      3dd                 delete 3 lines
  6635.      u                   undo previous change
  6636.      ZZ                  exit vi, saving changes
  6637.      :q!CR               quit, discarding changes
  6638.      /textCR             search for text
  6639.      U D                 scroll up or down
  6640.      :ex cmdCR           any ex or ed command
  6641.  
  6642.    Counts Before vi Commands
  6643.      Numbers may be typed as a prefix to some commands.  They are
  6644.      interpreted in one of these ways:
  6645.  
  6646.      line/column number  z G |
  6647.      scroll amount       D U
  6648.      repeat effect       most of the rest
  6649.  
  6650.    Interrupting, Canceling
  6651.      ESC                 end insert or incomplete cmd
  6652.      DEL                 (delete or rubout) interrupts
  6653.      L                   reprint screen if DEL scrambles it
  6654.      R                   reprint screen if L is -> key
  6655.  
  6656.    File Manipulation
  6657.      ZZ                  if file is modified, write and exit;
  6658.                          otherwise, exit
  6659.      :wCR                write back changes
  6660.      :w!CR               forced write, if permission originally
  6661.                          not valid
  6662.      :qCR                quit
  6663.      :q!CR               quit, discard changes
  6664.      :e nameCR           edit file name
  6665.      :e!CR               reedit, discard changes
  6666.      :e + nameCR         edit, starting at end
  6667.      :e +n filename CR   edit starting at line n
  6668.      :e #CR              edit alternate file
  6669.      :e! #CR             edit alternate file, discard changes
  6670.      :w nameCR           write file name
  6671.  
  6672.      :w! nameCR          overwrite file name
  6673.      :shCR               run shell, then return
  6674.      :!cmdCR             run cmd, then return
  6675.      :nCR                edit next file in arglist
  6676.      :n argsCR           specify new arglist
  6677.      G                   show current file and line
  6678.      :ta tagCR           to tag file entry tag
  6679.  
  6680.      In general, any ex or ed command (such as substitute or
  6681.      global) may be typed, preceded by a colon and followed by a
  6682.      CR.
  6683.  
  6684.    Positioning Within File
  6685.      F                   forward screen
  6686.      B                   backward screen
  6687.      D                   scroll down half screen
  6688.      U                   scroll up half screen
  6689.      Ng                  go to the beginning of the specified
  6690.                          line (end default), where n is a line
  6691.                          number
  6692.      /pat                next line matching pat
  6693.      ?pat                prev line matching pat
  6694.      n                   repeat last / or ? command
  6695.      N                   reverse last / or ? command
  6696.      /pat/+n             nth line after pat
  6697.      ?pat?-n             nth line before pat
  6698.      ]]                  next section/function
  6699.      [[                  previous section/function
  6700.      (                   beginning of sentence
  6701.      )                   end of sentence
  6702.      {                   beginning of paragraph
  6703.      }                   end of paragraph
  6704.      %                   find matching ( ) { or }
  6705.  
  6706.    Adjusting The Screen
  6707.      L                   clear and redraw
  6708.      zCR                 clear and redraw window if ^L is -> key
  6709.      ZCR                 redraw screen with current line at top
  6710.                          of window
  6711.      z-CR                redraw screen with current line at
  6712.                          bottom of window
  6713.      z.CR                redraw screen with current line at
  6714.                          center of window
  6715.      /pat/z-CR           move pat line to bottom of window
  6716.      zn.CR               use n line window
  6717.      E                   scroll window down 1 line
  6718.      Y                   scroll window up 1 line
  6719.    Marking and Returning
  6720.      ``                  move cursor to previous context
  6721.      ''                  move cursor to first non-white space in
  6722.                          line
  6723.      mx                  mark current position with the ACSII
  6724.                          lower-case letter x
  6725.      `x                  move cursor to mark x
  6726.      'x                  move cursor to first non-white space in
  6727.                          line marked by x
  6728.  
  6729.    Line Positioning
  6730.      H                   top line on screen
  6731.      L                   last line on screen
  6732.      M                   middle line on screen
  6733.      +                   next line, at first non-white
  6734.      -                   previous line, at first non-white
  6735.      CR                  return, same as +
  6736.      | or j              next line, same column
  6737.      | or k              previous line, same column
  6738.  
  6739.    Character Positioning
  6740.      first non-white-space character
  6741.      0                   beginning of line
  6742.      $                   end of line
  6743.      l or ->             forward
  6744.      h or <-             backwards
  6745.      H                   same as <- (backspace)
  6746.      space               same as -> (space bar)
  6747.      fx                  find next x
  6748.      Fx                  find previous x
  6749.      tx                  move to character prior to next x
  6750.      Tx                  move to character following previous x
  6751.      ;                   repeat last f F
  6752.      ,                   repeat last t T
  6753.      n|                  to specified column
  6754.      %                   find matching () { or }
  6755.  
  6756.    Words, Sentences, Paragraphs
  6757.      w                   forward a word
  6758.      b                   back a word
  6759.      e                   end of word
  6760.      )                   to next sentence
  6761.      }                   to next paragraph
  6762.      (                   back a sentence
  6763.      {                   back a paragraph
  6764.      W                   forward a blank-delimited word
  6765.      B                   back a blank-delimited word
  6766.      E                   to end of a blank-delimited word
  6767.    Corrections During Insert
  6768.      H                   erase last character (backspace)
  6769.      W                   erase last word
  6770.      erase               erase, same as H
  6771.      kill                kill, erase this line of input
  6772.      \                   quotes H, erase and kill characters
  6773.      ESC                 ends insertion, back to command mode
  6774.      DEL                 interrupt, terminates insert mode
  6775.      D                   backtab one character; reset left margin
  6776.                          of autoindent
  6777.      |D                  caret () followed by control-d (D);
  6778.                          backtab to beginning of line; do not
  6779.                          reset left margin of autoindent
  6780.      0D                  backtab to beginning of line; reset left
  6781.                          margin of autoindent
  6782.      V                   quote non-printable character
  6783.  
  6784.    Insert and Replace
  6785.      a                   append after cursor
  6786.      A                   append at end of line
  6787.      i                   insert before cursor
  6788.      I                   insert before first non-blank
  6789.      o                   open line below
  6790.      O                   open above
  6791.      rx                  replace single char with x
  6792.      RtextESC            replace characters
  6793.  
  6794.    Operators
  6795.      Operators are followed by a cursor motion, and affect all
  6796.      text that would have been moved over.  For example, since w
  6797.      moves over a word, dw deletes the word.  Double the
  6798.      operator, e.g., dd to affect whole lines.
  6799.  
  6800.      d                   delete
  6801.      c                   change
  6802.      y                   yank lines to buffer
  6803.      <                   left shift
  6804.      >                   right shift
  6805.      !                   filter through command
  6806.  
  6807.    Miscellaneous Operations
  6808.      C                   change rest of line (c$)
  6809.      D                   delete rest of line (d$)
  6810.      s                   substitute chars (cl)
  6811.      S                   substitute lines (cc)
  6812.      J                   join lines
  6813.      x                   delete characters (dl)
  6814.      X                   ... before cursor (dh)
  6815.      Y                   yank lines (yy)
  6816.    Yank and Put
  6817.      Put inserts the text most recently deleted or yanked;
  6818.      however, if a buffer is named (using the ASCII lower-case
  6819.      letters a - z), the text in that buffer is put instead.
  6820.  
  6821.      3yy                 yank 3 lines
  6822.      3yl                 yank 3 characters
  6823.      p                   put back text after cursor
  6824.      P                   put back text before cursor
  6825.      "xp                 put from buffer x
  6826.      "xY ("xyy)          yank to buffer x
  6827.      "xD ("xdd)          delete into buffer x
  6828.  
  6829.    Undo, Redo, Retrieve
  6830.      u                   undo last change
  6831.      U                   restore current line
  6832.      .                   repeat last change
  6833.      "dp                 retrieve d'th last delete
  6834.  
  6835. AUTHOR
  6836.      vi and ex were developed by The University of California,
  6837.      Berkeley California, Computer Science Division, Department
  6838.      of Electrical Engineering and Computer Science.
  6839.  
  6840. FILES
  6841.      /tmp                     default directory where temporary
  6842.                               work files are placed; it can be
  6843.                               changed using the directory option
  6844.                               (see the ex(1) set command)
  6845.      /usr/lib/terminfo/?/*    compiled terminal description
  6846.                               database
  6847.      /usr/lib/.COREterm/?/*   subset of compiled terminal
  6848.                               description database, supplied on
  6849.                               hard disk
  6850.  
  6851. NOTES
  6852.      Two options, although they continue to be supported, have
  6853.      been replaced in the documentation by options that follow
  6854.      the Command Syntax Standard (see intro(1)).  A -r option
  6855.      that is not followed with an option-argument has been
  6856.      replaced by -L and +command has been replaced by -c command.
  6857.  
  6858. SEE ALSO
  6859.      ed(1), ex(1).
  6860.      "Screen Editor Tutorial (vi)" in the UMAX V User's Guide.
  6861.  
  6862. WARNING
  6863.      The encryption options are provided with the Security
  6864.      Administration Utilities package, which is available only in
  6865.      the United States.
  6866.      Tampering with entries in /usr/lib/.COREterm/?/* or
  6867.      /usr/lib/terminfo/?/* (for example, changing or removing an
  6868.      entry) can affect programs such as vi(1) that expect the
  6869.      entry to be present and correct.  In particular, removing
  6870.      the "dumb" terminal may cause unexpected problems.
  6871.  
  6872. BUGS
  6873.      Software tabs using T work only immediately after the
  6874.      autoindent.
  6875.  
  6876.      Left and right shifts on intelligent terminals do not make
  6877.      use of insert and delete character operations in the
  6878.      terminal.
  6879. APPENDIX K:  ftp COMMANDS REFERENCE
  6880.  
  6881.  
  6882. NAME
  6883.      ftp - Internet file transfer program 
  6884.  
  6885. SYNOPSIS
  6886.      ftp [ -v ] [ -d ] [ -i ] [ -n ] [ -g ] [ host ]
  6887.                                                     
  6888. DESCRIPTION                                         
  6889.      ftp is the user interface to the DARPA File Transfer
  6890.      Protocol. The program transfers files to and from a remote
  6891.      network site.                                             
  6892.                                                                
  6893.      The client host with which ftp is to communicate can be   
  6894.      specified on the command line. In this case, ftp immediately
  6895.      attempts to establish a connection to an FTP server on that 
  6896.      host; otherwise, ftp enters its command interpreter and     
  6897.      waits for instruction, displaying the prompt ftp>.          
  6898.                                                                  
  6899.      ftp recognizes the following commands:                      
  6900.                                                                  
  6901.      ! [ command [ args ] ]                                      
  6902.                Invoke an interactive shell on the local machine. 
  6903.                If there are arguments, the first is taken to be a
  6904.                command to execute directly, with the rest of the 
  6905.                arguments as its arguments.                       
  6906.                                                                  
  6907.      $ macro-name [ args ]                                       
  6908.                Execute the macro-name that was defined with      
  6909.                the macdef command.  Arguments are passed to the  
  6910.                macro unglobbed.                                  
  6911.                                                                  
  6912.      account [ passwd ]                                          
  6913.                Supply a supplemental password required by a      
  6914.                remote system for access to resources once a login
  6915.                has been successfully completed.  If no argument  
  6916.                is included, the user will be prompted for an     
  6917.                account password in a non-echoing input mode.     
  6918.                                                                  
  6919.      append local-file [ remote-file ]                           
  6920.                Append a local file to a file on the remote       
  6921.                machine. If remote-file is left unspecified, the  
  6922.                local file name is used to name the remote file   
  6923.                after being altered by any ntrans or nmap setting.
  6924.                File transfer uses the current settings for type, 
  6925.                format, mode, and structure.                      
  6926.                                                                  
  6927.      ascii     Set the file transfer type to network ASCII. This 
  6928.                is the default type.
  6929.      bell      Sound a bell after each file transfer command is  
  6930.                completed.                                        
  6931.                                                                  
  6932.      binary    Set the file transfer type to support binary image
  6933.                transfer.                                         
  6934.                                                                  
  6935.      bye       Terminate the FTP session with the remote server  
  6936.                and exit ftp.                                     
  6937.                                                                  
  6938.      case      Toggle remote computer file name case mapping     
  6939.                during mget commands.  When case is on (default is
  6940.                off), remote computer file names with all letters 
  6941.                in upper case are written in the local directory  
  6942.                with the letters mapped to lower case.            
  6943.                                                                  
  6944.      cd remote-directory                                         
  6945.                Change the working directory on the remote machine
  6946.                to remote-directory.                              
  6947.                                                                  
  6948.      cdup      Change the remote machine working directory to the
  6949.                parent of the current remote machine working      
  6950.                directory.                                        
  6951.                                                                  
  6952.      close     Terminate the FTP session with the remote server, 
  6953.                and return to the command interpreter.  Any       
  6954.                defined macros are erased.                        
  6955.                                                                  
  6956.      cr        Toggle carriage return stripping during ASCII type
  6957.                file retrieval.  Records are denoted by a carriage
  6958.                return/linefeed sequence during ASCII type file   
  6959.                transfer.  When cr is on (the default), carriage  
  6960.                returns are stripped from this sequence to conform
  6961.                with the UNIX single linefeed record delimiter.   
  6962.                Records on non-UNIX remote systems may contain    
  6963.                single linefeeds; when an ASCII type transfer is  
  6964.                made, these linefeeds may be distinguished from a 
  6965.                record delimiter only when cr is off.             
  6966.                                                                  
  6967.      delete remote-file                                          
  6968.                Delete the file remote-file on the remote machine.
  6969.                                                                  
  6970.      debug [ debug-value ]                                       
  6971.                Toggle debugging mode. If an optional debug-value 
  6972.                is specified, it is used to set the debugging     
  6973.                level. When debugging is on, ftp prints each      
  6974.                command sent to the remote machine, preceded by   
  6975.                the string --> .                                  
  6976.      dir [ remote-directory ] [ local-file ]                     
  6977.                Print the contents of directory, remote-directory,
  6978.                and, optionally, place the output in local-file.  
  6979.                If no directory is specified, the current working 
  6980.                directory on the remote machine is used. If no    
  6981.                local file is specified, or local-file is -,      
  6982.                output comes to the terminal.                     
  6983.                                                                  
  6984.      disconnect                                                  
  6985.                A synonym for close.                              
  6986.                                                                  
  6987.      form format                                                 
  6988.                Set the file transfer form to format.  The default
  6989.                format is file.                                   
  6990.                                                                  
  6991.      get remote-file [ local-file ]                           
  6992.                Retrieve the remote-file and store it on the local
  6993.                machine. If the local file name is not specified, 
  6994.                it is given the same name it has on the remote    
  6995.                machine, subject to alteration by the current     
  6996.                case, ntrans, and nmap settings. The current      
  6997.                settings for type, form, mode, and structure are  
  6998.                used while transferring the file.                 
  6999.                                                                  
  7000.      glob      Toggle filename expansion for mdelete, mget and   
  7001.                mput.  If globbing is turned off with glob, the   
  7002.                file name arguments are taken literally and not   
  7003.                expanded.  Globbing for mput is done as in csh(1).
  7004.                For mdelete and mget, each remote file name is    
  7005.                expanded separately on the remote machine and the 
  7006.                lists are not merged.  Expansion of a directory   
  7007.                name is likely to be different from expansion of  
  7008.                the name of an ordinary file:  the exact result   
  7009.                depends on the foreign operating system and FTP   
  7010.                server, and can be previewed by doing             
  7011.                "mls remote-files -".  Note:  mget and mput are   
  7012.                not meant to transfer entire directory subtrees of
  7013.                files.  That can be done by transferring a tar(1) 
  7014.                archive of the subtree (in binary mode).          
  7015.                                                                  
  7016.      hash      Toggle number-sign (#) printing for each data     
  7017.                block transferred. The size of a data block is    
  7018.                1024 bytes.                                       
  7019.                                                                  
  7020.      help [ command ]                                            
  7021.                Print a description of command.  With no argument,
  7022.                ftp prints a list of the known commands.          
  7023.                                                                  
  7024.      lcd [ directory ]                                           
  7025.                Change the working directory on the local machine.
  7026.                If no directory is specified, changes to the      
  7027.                user's home directory.                            
  7028.  
  7029.      ls [ remote-directory ] [ local-file ]                      
  7030.                Print an abbreviated listing of the contents of a 
  7031.                directory on the remote machine. If remote-       
  7032.                directory is left unspecified, the current working
  7033.                directory is used. If no local file is specified, 
  7034.                the output is sent to the terminal.               
  7035.                                                                  
  7036.      macdef macro-name                                           
  7037.                Define a macro.  Subsequent lines are stored as   
  7038.                the macro macro-name; a null line (consecutive    
  7039.                newline characters in a file or carriage returns  
  7040.                from the terminal) terminates macro input mode.   
  7041.                There is a limit of 16 macros and 4096 total      
  7042.                characters in all defined macros.  Macros remain  
  7043.                defined until a close command is executed.  The   
  7044.                macro processor interprets "$" and "\" as special 
  7045.                characters.  A "$" followed by a number (or       
  7046.                numbers) is replaced by the corresponding argument
  7047.                on the macro invocation command line.  A "$"      
  7048.                followed by an "i" signals that macro processor   
  7049.                that the executing macro is to be looped. On the  
  7050.                first pass "$i" is replaced by the first argument 
  7051.                on the macro invocation command line, on the      
  7052.                second pass it is replaced by the second argument,
  7053.                and so on.  A "\" followed by any character is    
  7054.                replaced by that character.  Use the "\" to       
  7055.                prevent special treatment of the "$".             
  7056.                                                                  
  7057.      mdelete [ remote-files ]                                    
  7058.                Delete the specified files on the remote machine. 
  7059.                                                                  
  7060.      mdir remote-files local-file                             
  7061.                Like dir, except multiple remote files may be     
  7062.                specified.  If interactive prompting is on, ftp   
  7063.                will prompt the user to verify that the last      
  7064.                argument is indeed the target local file for      
  7065.                receiving mdir output.                            
  7066.                                                                  
  7067.      mget remote-files                                           
  7068.                Expand the remote-files on the remote machine and 
  7069.                do a get for each file name thus produced.  See   
  7070.                glob for details on the filename expansion.       
  7071.                Resulting file names will then be processed       
  7072.                according to case, ntrans, and nmap settings.     
  7073.                Files are transferred into the local working      
  7074.                directory, which can be changed with              
  7075.                "lcd directory"; new local directories can be     
  7076.                created with "! mkdir directory".                 
  7077.                                                                  
  7078.      mkdir directory-name                                        
  7079.                Make a directory on the remote machine.
  7080.      mls remote-files local-file                                 
  7081.                Like ls, except multiple remote files may be      
  7082.                specified.  If interactive prompting is on, ftp   
  7083.                will prompt the user to verify that the last      
  7084.                argument is indeed the target local file for      
  7085.                receiving mls output.                             
  7086.                                                                  
  7087.      mode [ mode-name ]                                          
  7088.                Set the file transfer mode to mode-name.  The     
  7089.                default mode is stream.                           
  7090.                                                                  
  7091.      mput local-files                                            
  7092.                Expand wild cards in the list of local files given
  7093.                as arguments and do a put for each file in the    
  7094.                resulting list.  See glob for details of filename 
  7095.                expansion.  Resulting file names will then be     
  7096.                processed according to ntrans and nmap settings.  
  7097.                                                                  
  7098.      nmap [ inpattern outpattern ]                               
  7099.                Set or unset the filename mapping mechanism.  If  
  7100.                no arguments are specified, the filename mapping  
  7101.                mechanism is unset.  If arguments are specified,  
  7102.                remote filenames are mapped during mput commands  
  7103.                and put commands issued without a specified remote
  7104.                target filename.  If arguments are specified,    
  7105.                local filenames are mapped during mget commands  
  7106.                and get commands issued without a specified local
  7107.                target filename.  This command is useful when    
  7108.                connecting to a non-UNIX remote computer with    
  7109.                different file naming conventions or practices.  
  7110.                The mapping follows the pattern set by inpattern 
  7111.                and outpattern.  inpattern is a template for     
  7112.                incoming filenames (which may have already been  
  7113.                processed according to the ntrans and case       
  7114.                settings).  Variable templating is accomplished by
  7115.                including the sequences "$1", "$2", ..., "$9" in  
  7116.                inpattern.  Use "\" to prevent this special       
  7117.                treatment of the "$" character.  All other        
  7118.                characters are treated literally, and are used to 
  7119.                determine the nmap inpattern variable values.  For
  7120.                example, given inpattern $1.$2 and the remote file
  7121.                name mydata.data, $1 would have the value mydata, 
  7122.                and $2 would have the value data.  The outpattern 
  7123.                determines the resulting mapped filename.  The    
  7124.                sequences "$1", "$2", ..., "$9" are replaced by   
  7125.                any value resulting from the inpattern template.  
  7126.                The sequence "$0" is replaced by the original     
  7127.                filename.  Additionally, the sequence             
  7128.                "[seq1,seq2]" is replaced by seq1 if seq1 is not a
  7129.                null string; otherwise it is replaced by seq2.    
  7130.                For example, the command "nmap $1.$2.$3
  7131.                [$1,$2].[$2,file]" would yield the output filename
  7132.                myfile.data for input filenames myfile.data and   
  7133.                myfile.data.old, myfile.file for the input        
  7134.                filename myfile, and myfile.myfile for the input  
  7135.                filename .myfile.  Spaces may be included in      
  7136.                outpattern, as in the example:                    
  7137.                                                                  
  7138.                     nmap $1 | sed "s/  *$//" > $1                
  7139.                                                                  
  7140.                Use the "\" character to prevent special treatment
  7141.                of the "$", "[", "]", and "," characters.         
  7142.                                                                  
  7143.      ntrans [ inchars [ outchars ] ]                             
  7144.                Set or unset the filename character translation   
  7145.                mechanism.  If no arguments are specified, the    
  7146.                filename character translation mechanism is unset.
  7147.                If arguments are specified, characters in remote  
  7148.                filenames are translated during mput commands and 
  7149.                put commands issued without a specified remote    
  7150.                target filename.  If arguments are specified,     
  7151.                characters in local filenames are translated      
  7152.                during mget commands and get commands issued      
  7153.                without a specified local target filename.  This  
  7154.                command is useful when connecting to a non-UNIX   
  7155.                remote computer with different file naming        
  7156.                conventions or practices.  Characters in a        
  7157.                filename matching a character in inchars are      
  7158.                replaced with the corresponding character in      
  7159.                outchars.  If the character's position in inchars 
  7160.                is longer than the length of outchars, the        
  7161.                character is deleted from the file name.          
  7162.                                                                  
  7163.      open host [ port ]                                          
  7164.                Establish a connection to the specified host's FTP
  7165.                server. An optional port number can be supplied,  
  7166.                in which case, ftp attempts to contact an FTP     
  7167.                server at that port. If the auto-login option is  
  7168.                on (default), ftp also attempts to automatically  
  7169.                log the user in to the FTP server (see below).    
  7170.                                                                  
  7171.      prompt    Toggle interactive prompting. Interactive         
  7172.                prompting occurs during multiple file transfers to
  7173.                allow the user to selectively retrieve or store   
  7174.                files. If prompting is turned off (default), any  
  7175.                mget or mput transfers all files and mdelete will 
  7176.                delete all files.
  7177.      proxy ftp-command                                           
  7178.                Execute an ftp command on a secondary control     
  7179.                connection.  This command allows simultaneous     
  7180.                connection to two remote FTP servers for          
  7181.                transferring files between the two servers.  The 
  7182.                first proxy command should be an open, to        
  7183.                establish the secondary control connection.  Enter
  7184.                the command "proxy ?" to see other ftp commands   
  7185.                executable on the secondary connection.  The      
  7186.                following commands behave differently when        
  7187.                prefaced by proxy:  open will not define new      
  7188.                macros during the auto-login process, close will  
  7189.                not erase existing macro definitions, get and mget
  7190.                transfer files from the host on the primary       
  7191.                control connection to the host on the secondary   
  7192.                control connection, and put, mput, and append     
  7193.                transfer files from the host on the secondary     
  7194.                control connection to the host on the primary     
  7195.                control connection.  Third party file transfers   
  7196.                depend upon support of the FTP protocol PASV      
  7197.                command by the server on the secondary control    
  7198.                connection.                                       
  7199.                                                                  
  7200.      put local-file [ remote-file ]                              
  7201.                Store a local file on the remote machine. If      
  7202.                remote-file is left unspecified, the local file   
  7203.                name is used in naming the remote file, after     
  7204.                processing according to any ntrans or nmap        
  7205.                settings.  File transfer uses the current settings
  7206.                for type, format, mode, and structure.            
  7207.                                                                  
  7208.      pwd       Print the name of the current working directory on
  7209.                the remote machine.                               
  7210.                                                                  
  7211.      quit      A synonym for bye.                                
  7212.                                                                  
  7213.      quote arg1 arg2 ...                                         
  7214.                The arguments specified are sent, verbatim, to the
  7215.                remote FTP server.                                
  7216.                                                                  
  7217.      recv remote-file [ local-file ]                             
  7218.                A synonym for get.                                
  7219.                                                                  
  7220.      remotehelp [ command-name ]                                 
  7221.                Request help from the remote FTP server. If a     
  7222.                command-name is specified, it is supplied to the  
  7223.                server as well.                                   
  7224.                                                                  
  7225.      rename [ from ] [ to ]                                      
  7226.                Rename, on the remote machine, the file from to   
  7227.                the file to.
  7228.      reset     Clear reply queue.  This command re-synchronizes  
  7229.                command/reply sequencing with the remote FTP      
  7230.                server.  Resynchronization may be necessary       
  7231.                following a violation of the FTP protocol by the  
  7232.                remote server.                                    
  7233.                                                                  
  7234.      rmdir directory-name                                        
  7235.                Delete a directory on the remote machine.         
  7236.                                                                  
  7237.      runique   Toggle storing of files on the local system with  
  7238.                unique filenames.  If a file already exists with a
  7239.                name equal to the target local filename for a get 
  7240.                or mget command, a ".1" is appended to the name.  
  7241.                If the resulting name matches another existing    
  7242.                file, a ".2" is appended to the original name.  If
  7243.                this process continues up to ".99", an error      
  7244.                message is printed, and the transfer does not take
  7245.                place.  The generated unique filename will be     
  7246.                reported.  Note that runique will not affect local
  7247.                files generated from a shell command (see below). 
  7248.                The default value is off.                         
  7249.                                                                  
  7250.      send local-file [ remote-file ]                             
  7251.                A synonym for put.                                
  7252.                                                                  
  7253.      sendport  Toggle the use of PORT commands. By default, ftp  
  7254.                attempts to use a PORT command when establishing a
  7255.                connection for each data transfer. The use of PORT
  7256.                commands can prevent delays when performing       
  7257.                multiple file transfers.  If the PORT command     
  7258.                fails, ftp uses the default data port. When the   
  7259.                use of PORT commands is disabled, no attempt is   
  7260.                made to use them for each data transfer. This is  
  7261.                useful for certain FTP implementations that do    
  7262.                ignore PORT commands but wrongly indicate they    
  7263.                have been accepted.                               
  7264.                                                                  
  7265.      status    Show the current status of ftp.                   
  7266.  
  7267.      struct [ struct-name ]                                      
  7268.                Set the file transfer structure to struct-name.   
  7269.                The default structure is stream.                  
  7270.                                                                  
  7271.      sunique   Toggle storing of files on remote machine under   
  7272.                unique file names.  Remote FTP server must support
  7273.                 the FTP protocol STOU command for successful    
  7274.                completion.  The remote server will report a     
  7275.                unique name.  Default value is off.              
  7276.                                                                 
  7277.      tenex     Set the file transfer type to that needed to talk
  7278.                to TENEX machines.
  7279.      trace     Toggle packet tracing.                           
  7280.                                                                 
  7281.      type [ type-name ]                                         
  7282.                Set the file transfer type to type-name.  If no  
  7283.                type-name is specified, the current type is      
  7284.                printed. The default type is network ascii.      
  7285.                                                                 
  7286.      user user-name [ password ] [ account ]                    
  7287.                The user identifies him/herself to the remote FTP 
  7288.                server. If the password is not specified and the  
  7289.                server requires it, ftp prompts the user for it   
  7290.                (after disabling local echo).  If an account field
  7291.                is not specified, and the FTP server requires it, 
  7292.                the user is prompted for it. If an account field  
  7293.                is specified, an account command will be relayed  
  7294.                to the remote server after the login sequence is  
  7295.                completed if the remote server did not require it 
  7296.                for logging in.  Unless ftp is invoked with       
  7297.                "auto-login" disabled, this process is done       
  7298.                automatically on initial connection to the FTP    
  7299.                server.                                           
  7300.                                                                  
  7301.      verbose   Toggle verbose mode. In verbose mode, all         
  7302.                responses from the FTP server are displayed to the
  7303.                user. In addition, if verbose is on, when a file  
  7304.                transfer completes, statistics regarding the      
  7305.                efficiency of the transfer are reported. By       
  7306.                default, verbose is on.                           
  7307.                                                                  
  7308.      ? [ command ]                                               
  7309.                A synonym for help.                               
  7310.                                                                  
  7311.      Command arguments that have embedded spaces can be quoted   
  7312.      with double quote (") marks.                                
  7313.                                                                  
  7314. ABORTING A FILE TRANSFER                                         
  7315.      To abort a file transfer, use the terminal interrupt key    
  7316.      (usually <ctrl>C).  Sending transfers will be immediately   
  7317.      halted.  Receiving transfers will be halted by sending a FTP
  7318.      protocol ABOR command to the remote server, and discarding  
  7319.      any further data received.  The speed at which this is      
  7320.      accomplished depends upon the remote server's support for   
  7321.      ABOR processing.  If the remote server does not support the 
  7322.      ABOR command, an ftp> prompt will not appear until the      
  7323.      remote server has completed sending the requested file.     
  7324.                                                                  
  7325.      The terminal interrupt key sequence will be ignored when ftp
  7326.      has completed any local processing and is awaiting a reply  
  7327.      from the remote server.  A long delay in this mode may      
  7328.      result from the ABOR processing described above, or from    
  7329.      unexpected behavior by the remote server, including         
  7330.      violations of the FTP protocol.  If the delay results from  
  7331.      unexpected remote server behavior, the local ftp program    
  7332.      must be killed by hand.                                     
  7333.                                                                  
  7334. FILE NAMING CONVENTIONS                                          
  7335.      Files specified as arguments to ftp commands are processed  
  7336.      according to the following rules.                           
  7337.                                                                  
  7338.      1.   If the file name is -, the standard input (for reading)
  7339.           or the standard output (for writing) is used.          
  7340.                                                                  
  7341.      2.   If the first character of the file name is a bar |, the
  7342.           remainder of the argument is interpreted as a shell    
  7343.           command.  ftp then forks a shell, using popen(3S) with 
  7344.           the argument supplied, and reads (writes) from the     
  7345.           stdout (stdin).  If the shell command includes spaces, 
  7346.           the argument must be quoted; for example, "| ls -lt". A
  7347.           particularly useful example of this mechanism is       
  7348.           "dir | more".                                          
  7349.                                                                  
  7350.      3.   Failing the above checks, if globbing is enabled, local
  7351.           file names are expanded according to the rules used in 
  7352.           the csh(1); see the glob command.  If the ftp command  
  7353.           expects a single local file (e.g., put), only the first
  7354.           filename generated by the globbing operation is used.  
  7355.                                                                  
  7356.      4.   For mget commands and get commands with unspecified    
  7357.           local file names, the local filename is the remote     
  7358.           filename, which may be altered by a case, ntrans, or   
  7359.           nmap setting.  The resulting filename may then be      
  7360.           altered if runique is on.                              
  7361.                                                                  
  7362.      5.   For mput commands and put commands with unspecified    
  7363.           remote file names, the remote filename is the local    
  7364.           filename, which may be altered by a ntrans or nmap     
  7365.           setting.  The resulting filename may then be altered by
  7366.           the remote server if sunique is on.                    
  7367.                                                                  
  7368. FILE TRANSFER PARAMETERS                                         
  7369.      The FTP specification identifies many parameters that can   
  7370.      affect a file transfer. The type can be one of ascii, image 
  7371.      (binary), ebcdic, and local byte size (for PDP-10's and     
  7372.      PDP-20's mostly).  ftp supports the ascii and image types of
  7373.      file transfer, plus local byte size 8 for tenex mode        
  7374.      transfers.                                                  
  7375.                                                                  
  7376.      ftp supports only the default values for the remaining file 
  7377.      transfer parameters:  mode, form, and struct.               
  7378.                                                                  
  7379. OPTIONS                                                          
  7380.      Options can be specified at the command line, or to the     
  7381.      command interpreter.                                        
  7382.  
  7383.      The -v (verbose on) option forces ftp to show all responses 
  7384.      from the remote server, as well as report on data transfer  
  7385.      statistics.                                                 
  7386.                                                                  
  7387.      The -n option restrains ftp from attempting "auto-login"    
  7388.      upon initial connection.  If auto-login is enabled, ftp     
  7389.      checks the netrc file in the user's home directory for an   
  7390.      entry describing an account on the remote machine. If no    
  7391.      entry exists, ftp will prompt for the remote machine login  
  7392.      name (default is the user identity on the local machine),   
  7393.      and, if necessary, prompt for a password and an account with
  7394.      which to login.                                             
  7395.                                                                  
  7396.      The -i option turns off interactive prompting during        
  7397.      multiple file transfers.                                    
  7398.                                                                  
  7399.      The -d option enables debugging.                            
  7400.                                                                  
  7401.      The -g option disables file name globbing.                  
  7402.                                                                  
  7403. THE .netrc FILE                                                  
  7404.      The .netrc file contains login and initialization           
  7405.      information used by the "auto-login" process.  It resides in
  7406.      the user's home directory.  The following tokens are        
  7407.      recognized; they may be separated by spaces, tabs, or new-  
  7408.      lines:                                                      
  7409.                                                                  
  7410.      machine name                                                
  7411.           Identify a remote machine name.  The auto-login process
  7412.           searches the .netrc file for a machine token that      
  7413.           matches the remote machine specified on the ftp command
  7414.           line or as an open command argument.  Once a match is  
  7415.           made, the subsequent .netrc tokens are processed,      
  7416.           stopping when the end of file is reached or another    
  7417.           machine token is encountered.                          
  7418.                                                                  
  7419.      login name                                                  
  7420.           Identify a user on the remote machine.  If this token  
  7421.           is present, the "auto-login" process will initiate a   
  7422.           login using the specified name.                        
  7423.                                                                  
  7424.      password string                                             
  7425.           Supply a password.  If this token is present, the      
  7426.           "auto-login" process will supply the specified string  
  7427.           if the remote server requires a password as part of the
  7428.           login process.  Note that if this token is present in  
  7429.           the .netrc file, ftp will abort the "auto-login"       
  7430.           process if the .netrc is readable by anyone besides the
  7431.           user.                                                  
  7432.     account string                                              
  7433.           Supply an additional account password.  If this token  
  7434.           is present, the "auto-login" process will supply the   
  7435.           specified string if the remote server requires an      
  7436.           additional account password, or the "auto-login"       
  7437.           process will initiate an ACCT command if it does not.  
  7438.                                                                  
  7439.      macdef name                                                
  7440.           Define a macro.  This token functions like the ftp    
  7441.           macdef command functions.  A macro is defined with the
  7442.           specified name; its contents begin with the next .netrc
  7443.           line and continue until a null line (consecutive new- 
  7444.           line characters) is encountered.  If a macro named init
  7445.           is defined, it is automatically executed as the last   
  7446.           step in the "auto-login" process.                      
  7447.                                                                  
  7448. SEE ALSO                                                         
  7449.      csh(1).                                                    
  7450.      ftpd(1M) in the UMAX V Administrator's Reference Manual.   
  7451.                                                                 
  7452. BUGS                                                            
  7453.      Correct execution of many commands depends upon proper     
  7454.      behavior by the remote server.                             
  7455.                                                                 
  7456.      An error in the treatment of carriage returns in the 4.2BSD
  7457.      UNIX ASCII-mode transfer code has been corrected.  This    
  7458.      correction may result in incorrect transfers of binary files
  7459.      to and from 4.2BSD servers using the ascii type.  Avoid this
  7460.      problem by using the binary image type.
  7461. APPENDIX L:  telnet COMMANDS REFERENCE
  7462.  
  7463.  
  7464. NAME
  7465.      telnet - user interface to the TELNET protocol
  7466.  
  7467. SYNOPSIS
  7468.      telnet [ host [ port ] ]
  7469.  
  7470. DESCRIPTION
  7471.      The telnet command communicates with another host using the
  7472.      TELNET protocol. If telnet is invoked without arguments, it
  7473.      enters command mode, indicated by its prompt (for example,
  7474.      telnet>).  In this mode, it accepts and executes the
  7475.      commands listed below. If it is invoked with arguments, it
  7476.      performs an open command (see below) with those arguments.
  7477.      Once a connection has been opened, telnet enters input mode.
  7478.      The input mode entered will be either character at a time or
  7479.      line by line depending on what the remote system supports.
  7480.  
  7481.      In character at a time mode, most text typed is immediately
  7482.      sent to the remote host for processing.
  7483.      In line by line mode, all text is echoed locally, and
  7484.      (normally) only completed lines are sent to the remote host.
  7485.      The local echo character (initially ^E) may be used to turn
  7486.      off and on the local echo (this would mostly be used to
  7487.      enter passwords without the password being echoed).
  7488.  
  7489.      In either mode, if the localchars toggle is TRUE (the
  7490.      default in line mode; see below), the user's quit, intr, and
  7491.      flush characters are trapped locally, and sent as TELNET
  7492.      protocol sequences to the remote side.  There are options
  7493.      (see toggle autoflush and toggle autosynch below) which
  7494.      cause this action to flush subsequent output to the terminal
  7495.      (until the remote host acknowledges the TELNET sequence) and
  7496.      flush previous terminal input (in the case of quit and
  7497.      intr).
  7498.  
  7499.      While connected to a remote host, telnet command mode may be
  7500.      entered by typing the telnet escape character (initially
  7501.      ^]).  When in command mode, the normal terminal editing
  7502.      conventions are available.
  7503.  
  7504. COMMANDS
  7505.      The following commands are available.  Only enough of each
  7506.      command to uniquely identify it need be typed (this is also
  7507.      true for arguments to the mode, set, toggle, and display
  7508.      commands).
  7509.      open host [ port ]
  7510.               Open a connection to the named host. If no port
  7511.               number is specified, telnet attempts to contact a
  7512.               TELNET server at the default port.  The host
  7513.               specification can be either a host name (see
  7514.               hosts(4)) or an Internet address specified in "dot
  7515.               notation" (see inet(3N)).
  7516.  
  7517.      close    Close a TELNET session and return to command mode.
  7518.  
  7519.      quit     Close any open TELNET session and exit telnet.  An
  7520.               end-of-file (in command mode) will also close a
  7521.               session and exit.
  7522.  
  7523.      <ctrl>Z  Suspend telnet.  This command only works when the
  7524.               user is using the csh(1) or the BSD application
  7525.               environment version of ksh(1).
  7526.  
  7527.      status   Show the current status of telnet.  This includes
  7528.               the peer one is connected to, as well as the
  7529.               current mode.
  7530.  
  7531.      display [ argument ... ]
  7532.               Displays all, or some, of the set and toggle values
  7533.               (see below).
  7534.  
  7535.      ? [ command ]
  7536.               Get help.  With no arguments, telnet prints a help
  7537.               summary.  If a command is specified, telnet will
  7538.               print the help information for just that command.
  7539.  
  7540.      send arguments
  7541.               Sends one or more special character sequences to
  7542.               the remote host.  The following are the arguments
  7543.               which may be specified (more than one argument may
  7544.               be specified at a time):
  7545.  
  7546.               escape
  7547.                    Sends the current telnet escape character
  7548.                    (initially ^]).
  7549.  
  7550.               synch
  7551.                    Sends the TELNET SYNCH sequence.  This
  7552.                    sequence causes the remote system to discard
  7553.                    all previously typed (but not yet read) input.
  7554.                    This sequence is sent as TCP urgent data (and
  7555.                    may not work if the remote system is a 4.2 BSD
  7556.                    system -- if it doesn't work, a lower case r
  7557.                    may be echoed on the terminal).
  7558.               brk
  7559.                    Sends the TELNET BRK (Break) sequence, which
  7560.                    may have significance to the remote system.
  7561.  
  7562.               ip
  7563.                    Sends the TELNET IP (Interrupt Process)
  7564.                    sequence, which should cause the remote system
  7565.                    to abort the currently running process.
  7566.  
  7567.               ao
  7568.                    Sends the TELNET AO (Abort Output) sequence,
  7569.                    which should cause the remote system to flush
  7570.                    all output from the remote system to the
  7571.                    user's terminal.
  7572.  
  7573.               ayt
  7574.                    Sends the TELNET AYT (Are You There) sequence,
  7575.                    to which the remote system may or may not
  7576.                    choose to respond.
  7577.  
  7578.               ec
  7579.                    Sends the TELNET EC (Erase Character)
  7580.                    sequence, which should cause the remote system
  7581.                    to erase the last character entered.
  7582.  
  7583.               el
  7584.                    Sends the TELNET EL (Erase Line) sequence,
  7585.                    which should cause the remote system to erase
  7586.                    the line currently being entered.
  7587.  
  7588.               ga
  7589.                    Sends the TELNET GA (Go Ahead) sequence, which
  7590.                    likely has no significance to the remote
  7591.                    system.
  7592.  
  7593.               nop
  7594.                    Sends the TELNET NOP (No operation) sequence.
  7595.  
  7596.               ?
  7597.                    Prints out help information for the send
  7598.                    command.
  7599.  
  7600.      set argument value
  7601.               Set any one of a number of telnet variables to a
  7602.               specific value.  The special value off turns off
  7603.               the function associated with the variable.  The
  7604.               values of variables may be interrogated with the
  7605.               display command.  The variables which may be
  7606.               specified are:
  7607.               echo
  7608.                    This is the value (initially ^E) which, when
  7609.                    in line by line mode, toggles between doing
  7610.                    local echoing of entered characters (for
  7611.                    normal processing), and suppressing echoing of
  7612.                    entered characters (for entering, say, a
  7613.                    password).
  7614.               escape
  7615.                    This is the telnet escape character (initially
  7616.                    ^[) which causes entry into telnet command
  7617.                    mode (when connected to a remote system).
  7618.  
  7619.               interrupt
  7620.                    If telnet is in localchars mode (see toggle
  7621.                    localchars below) and the interrupt character
  7622.                    is typed, a TELNET IP sequence (see send ip
  7623.                    above) is sent to the remote host.  The
  7624.                    initial value for the interrupt character is
  7625.                    taken to be the terminal's intr character.
  7626.  
  7627.               quit
  7628.                    If telnet is in localchars mode (see toggle
  7629.                    localchars below) and the quit character is
  7630.                    typed, a TELNET BRK sequence (see send brk
  7631.                    above) is sent to the remote host.  The
  7632.                    initial value for the quit character is taken
  7633.                    to be the terminal's quit character.
  7634.  
  7635.               flushoutput
  7636.                    If telnet is in localchars mode (see toggle
  7637.                    localchars below) and the flushoutput
  7638.                    character is typed, a TELNET AO sequence (see
  7639.                    send ao above) is sent to the remote host.
  7640.                    The initial value for the flush character is
  7641.                    taken to be the terminal's flush character.
  7642.  
  7643.               erase
  7644.                    If telnet is in localchars mode (see toggle
  7645.                    localchars below), and if telnet is operating
  7646.                    in character at a time mode, then when this
  7647.                    character is typed, a TELNET EC sequence (see
  7648.                    send ec above) is sent to the remote system.
  7649.                    The initial value for the erase character is
  7650.                    taken to be the terminal's erase character.
  7651.               kill
  7652.                    If telnet is in localchars mode (see toggle
  7653.                    localchars below), and if telnet is operating
  7654.                    in character at a time mode, then when this
  7655.                    character is typed, a TELNET EL sequence (see
  7656.                    send el above) is sent to the remote system.
  7657.                    The initial value for the kill character is
  7658.                    taken to be the terminal's kill character.
  7659.  
  7660.               eof
  7661.                    If telnet is operating in line by line mode,
  7662.                    entering this character as the first character
  7663.                    on a line will cause this character to be sent
  7664.                    to the remote system.  The initial value of
  7665.                    the eof character is taken to be the
  7666.                    terminal's eof character.
  7667.  
  7668.      toggle arguments ...
  7669.               Toggle (between TRUE and FALSE) various flags that
  7670.               control how telnet responds to events.  More than
  7671.               one argument may be specified.  The state of these
  7672.               flags may be interrogated with the display command.
  7673.               Valid arguments are:
  7674.  
  7675.               localchars
  7676.                    If this is TRUE, then the flush, interrupt,
  7677.                    quit, erase, and kill characters (see set
  7678.                    above) are recognized locally, and transformed
  7679.                    into (hopefully) appropriate TELNET control
  7680.                    sequences (respectively ao, ip, brk, ec, and
  7681.                    el; see send above).  The initial value for
  7682.                    this toggle is TRUE in line by line mode, and
  7683.                    FALSE in character at a time mode.
  7684.  
  7685.               autoflush
  7686.                    If autoflush and localchars are both TRUE,
  7687.                    then when the ao, intr, or quit characters are
  7688.                    recognized (and transformed into TELNET
  7689.                    sequences; see set above for details), telnet
  7690.                    refuses to display any data on the user's
  7691.                    terminal until the remote system acknowledges
  7692.                    (via a TELNET Timing Mark option) that it has
  7693.                    processed those TELNET sequences.  The initial
  7694.                    value for this toggle is TRUE if the terminal
  7695.                    user had not done an stty noflsh, otherwise
  7696.                    FALSE (see stty(1)).
  7697.  
  7698.               autosynch
  7699.                    If autosynch and localchars are both TRUE,
  7700.                    then when either the intr or quit characters
  7701.                    is typed (see set above for descriptions of
  7702.                    the intr and quit characters), the resulting
  7703.                    TELNET sequence sent is followed by the TELNET
  7704.                    SYNCH sequence.  This procedure should cause
  7705.                    the remote system to begin throwing away all
  7706.                    previously typed input until both of the
  7707.                    TELNET sequences have been read and acted
  7708.                    upon.  The initial value of this toggle is
  7709.                    FALSE.
  7710.               crmod
  7711.                    Toggle carriage return mode.  When this mode
  7712.                    is enabled, most carriage return characters
  7713.                    received from the remote host will be mapped
  7714.                    into a carriage return followed by a line
  7715.                    feed.  This mode does not affect those
  7716.                    characters typed by the user, only those
  7717.                    received from the remote host.  This mode is
  7718.                    not very useful unless the remote host only
  7719.                    sends carriage return, but never line feed.
  7720.                    The initial value for this toggle is FALSE.
  7721.  
  7722.               debug
  7723.                    Toggles socket level debugging (useful only to
  7724.                    the super-user).  The initial value for this
  7725.                    toggle is FALSE.
  7726.  
  7727.               options
  7728.                    Toggles the display of some internal telnet
  7729.                    protocol processing (having to do with TELNET
  7730.                    options).  The initial value for this toggle
  7731.                    is FALSE.
  7732.  
  7733.               netdata
  7734.                    Toggles the display of all network data (in
  7735.                    hexadecimal format).  The initial value for
  7736.                    this toggle is FALSE.
  7737.  
  7738.               ?
  7739.                    Displays the legal toggle commands.
  7740.  
  7741. SEE ALSO
  7742.      csh(1), ksh(1), rlogin(1N).
  7743.      inet(3N), services(4), hosts(4) in the UMAX V Programmer's
  7744.      Reference Manual.
  7745.      telenetd(1M) in the UMAX V Administrator's Reference Manual.
  7746.  
  7747. BUGS
  7748.    There is no adequate way for dealing with flow control.
  7749.    On some remote systems, echo has to be turned off manually
  7750.    when in line by line mode.
  7751.  
  7752.    There is enough settable state to justify a .telnetrc file.
  7753.  
  7754.    No capability for a .telnetrc file is provided.
  7755.  
  7756.    In line by line mode, the terminal's eof character is only
  7757.    recognized (and sent to the remote system) when it is the
  7758.    first character on a line.
  7759. APPENDIX M:  domax1 AND domax0 HARDWARE CONFIGURATION
  7760.  
  7761.  
  7762.                        ┌─────────┐
  7763.                        │Cassette │
  7764.                        │  Drive  │
  7765.                        │         │          ┌────────┐  ┌────────┐ 
  7766.                        └────┬────┘          │  Disk  │  │  Disk  │ 
  7767.                             │               │  Drive │  │  Drive │
  7768.                             │               │        │  │        │ 
  7769. ┌────────┐            ┌─────┴──────────────┐└───────┬┘  └─┬──────┘ 
  7770. │  Tape  ├────────────┤                    ├────────┴─────┴──────────────
  7771. │ Drive  │            │                    │                              
  7772. └────────┘            │     4 X 2 MIP      ├────────┴─────┴─────┴─────┴──
  7773. ┌────────┐            │                    │                                 
  7774. │  Tape  │            │    Multimax 310    ├────────┴─────┴─────┴─────┴──
  7775. │ Drive  ├────────────┤                    │                                 
  7776. └────────┘            │                    ├────────┴─────┴─────┴─────┴──   ┌──────────────┐
  7777.                       └──┬────────────┬────┘                                │     Port     │
  7778.                          │            │        ┌──────────────┐             │   Selector   │  
  7779.                          │            ├────────┤   Console    │             │              │ 
  7780.                          │       ┌────┴──────┐ │   Hardcopy   │             └─┬──┬──┬──┬──┬┘ 
  7781.                          │       │  Console  │ │              │               │  │  │  │  │ 32 Lines
  7782.                          │       │           │ └──────────────┘             ┌─┴──┴──┴──┴──┴┐
  7783.                          │       │    CRT    │                              │              │
  7784.                          │       └───────────┘                              │   Annex 01   │
  7785.                          │                                                  │              │
  7786.                          │                                                  └───────┬──────┘
  7787. Ethernet  ───────────────┴────────────────────────────────────────────┬─────────────┴───────────────
  7788.                                                                 ┌─────┴─────┐  
  7789.                                                                 │ Annex 00  │  
  7790.                                                                 │           │  
  7791.                                                                 └──┬─────┬──┘  
  7792.                                                           ┌────────┴─┐ ┌─┴────────┐
  7793.                                                           │  mtlzr   │ │  mt_600  │
  7794.                                                           │          │ │          │
  7795.                                                           └──────────┘ └──────────┘        
  7796.  
  7797.                                             NOTES
  7798. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  7799. APPENDIX N:  BASIC UNIX REVIEW
  7800.  
  7801.  
  7802. Write the letter(s) of the UNIX component that best fit each
  7803. description.
  7804.  
  7805.  
  7806. K  =  Kernel         S  =  Shell          U  =  Utilities             D  =  Directory
  7807.  
  7808.  
  7809. _____         1.     Uses standard syntax for all commands.
  7810.  
  7811. _____         2.     Schedules tasks and manages data storage.
  7812.  
  7813. _____         3.     Memory resident code.
  7814.  
  7815. _____         4.     Main interface between UNIX and users.
  7816.  
  7817. _____         5.     Heart of the operating system.
  7818.  
  7819. _____         6.     Can be easily combined to perform the exact
  7820.                      function which the user desires.
  7821.  
  7822. _____         7.     Path name concept.
  7823.  
  7824. _____         8.     Written mostly in the "C" programming language.
  7825.  
  7826. _____         9.     Multi-level directory structure.
  7827.  
  7828. _____         10.    Uses pipes and filters.
  7829.  
  7830. _____         11.    Supports control structures.
  7831.  
  7832. _____         12.    Includes text processing, electronic mail, file
  7833.                      manipulation, and program generation.
  7834.                                             NOTES
  7835. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  7836.                                             INDEX
  7837.  
  7838.  
  7839. . (dot)..................................................................................63
  7840. .. (dot dot).............................................................................63
  7841. Access modes.............................................................................37
  7842. Annex Commands
  7843.        call..............................................................................16
  7844.        hangup............................................................................21
  7845. BourneShell prompt........................................................................6
  7846. BSD UNIX..................................................................................2
  7847. Current working directory................................................................63
  7848. Expiration period........................................................................19
  7849. FTP Commands............................................................................108
  7850.        !................................................................................116
  7851.        ?................................................................................123
  7852.        cd...............................................................................119
  7853.        close............................................................................121
  7854.        get remote-file..................................................................113
  7855.        help.............................................................................123
  7856.        lcd..............................................................................115
  7857.        ls...............................................................................120
  7858.        open host........................................................................109
  7859.        Password.........................................................................110
  7860.        put..............................................................................117
  7861.        quit.............................................................................122
  7862.        status...........................................................................124
  7863. Kernel...................................................................................33
  7864. KornShell.................................................................................2
  7865. Mailx Commands...........................................................................74
  7866.        ?.................................................................................82
  7867.        d.................................................................................80
  7868.        S.............................................................................77, 78
  7869. MICOM....................................................................................14
  7870. Number links.............................................................................37
  7871. On-line manual pages.....................................................................25
  7872. Ownership and group affiliation..........................................................37
  7873. Parent...................................................................................64
  7874. Password.................................................................................19
  7875. Pathname.................................................................................57
  7876. PROCOMM+.................................................................................14
  7877. Protections..............................................................................34
  7878. Redirection..........................................................................94, 95
  7879. Root directory............................................................................4
  7880. Scrolling................................................................................10
  7881. Shell.....................................................................................1
  7882. Standard input...........................................................................93
  7883. Standard output..........................................................................93
  7884. Subdirectory.............................................................................61
  7885. System V UNIX.............................................................................2
  7886. TAB.....................................................................................153
  7887. TCP/IP..................................................................................107
  7888. Terminal nodes............................................................................3
  7889. UMAX.....................................................................................19
  7890. UNIX Commands
  7891.        assist...........................................................................151
  7892.        cancel............................................................................48
  7893.        cat...............................................................................40
  7894.        cd................................................................................61
  7895.        chmod.............................................................................35
  7896.        cp............................................................................49, 50
  7897.        exit..............................................................................20
  7898.        file..............................................................................39
  7899.        lp................................................................................45
  7900.        lpstat............................................................................47
  7901.        ls................................................................................37
  7902.        mkdir.............................................................................58
  7903.        mv................................................................................62
  7904.        pg................................................................................42
  7905.        pwd...............................................................................57
  7906.        rmdir.............................................................................59
  7907.        tail..............................................................................43
  7908. UNIX filesystem...........................................................................3
  7909. UNIX Keyboard Function Commands
  7910.        #..................................................................................9
  7911.        @..................................................................................9
  7912.        Ctrl-D............................................................................20
  7913.        Ctrl-Q............................................................................10
  7914.        Ctrl-S............................................................................10
  7915.        Delete............................................................................10
  7916.        Hold Screen.......................................................................10
  7917. UNIX Primer Plus........................................................................153
  7918. vi Commands
  7919.        :!shell-cmd......................................................................147
  7920.        :q!..............................................................................145
  7921.        :r !shell-cmd....................................................................147
  7922.        :r filename......................................................................147
  7923.        :w...............................................................................145
  7924.        :w newfile.......................................................................147
  7925.        :wq..............................................................................146
  7926. Wildcards...............................................................................100
  7927. 
  7928. Downloaded From P-80 International Information Systems 304-744-2253
  7929.  
  7930.  
  7931.  
  7932.  
  7933.  
  7934. ... texts ...